veriexec: Add option MAC_VERIEXEC_DEBUG
Obtained from: Juniper Networks, Inc.
This commit is contained in:
parent
8c3e263dc1
commit
d195f39d1d
@ -67,7 +67,7 @@
|
||||
#define SLOT_SET(l, v) \
|
||||
mac_label_set((l), mac_veriexec_slot, (v))
|
||||
|
||||
#ifdef MAC_DEBUG
|
||||
#ifdef MAC_VERIEXEC_DEBUG
|
||||
#define MAC_VERIEXEC_DBG(_lvl, _fmt, ...) \
|
||||
do { \
|
||||
VERIEXEC_DEBUG((_lvl), (MAC_VERIEXEC_FULLNAME ": " _fmt \
|
||||
@ -204,10 +204,8 @@ mac_veriexec_vfs_mounted(void *arg __unused, struct mount *mp,
|
||||
return;
|
||||
|
||||
SLOT_SET(mp->mnt_label, va.va_fsid);
|
||||
#ifdef MAC_DEBUG
|
||||
MAC_VERIEXEC_DBG(3, "set fsid to %ju for mount %p",
|
||||
(uintmax_t)va.va_fsid, mp);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -41,7 +41,7 @@
|
||||
|
||||
#define VERIEXEC_FILES_FIRST 1
|
||||
|
||||
#if defined(VERIFIED_EXEC_DEBUG) || defined(VERIFIED_EXEC_DEBUG_VERBOSE)
|
||||
#ifdef MAC_VERIEXEC_DEBUG
|
||||
# define VERIEXEC_DEBUG(n, x) if (mac_veriexec_debug > (n)) printf x
|
||||
#else
|
||||
# define VERIEXEC_DEBUG(n, x)
|
||||
|
@ -41,6 +41,9 @@
|
||||
#include <sys/mutex.h>
|
||||
#include <sys/proc.h>
|
||||
#include <sys/sbuf.h>
|
||||
#ifdef MAC_VERIEXEC_DEBUG
|
||||
#include <sys/syslog.h>
|
||||
#endif
|
||||
#include <sys/vnode.h>
|
||||
|
||||
#include "mac_veriexec.h"
|
||||
@ -548,7 +551,7 @@ mac_veriexec_metadata_fetch_fingerprint_status(struct vnode *vp,
|
||||
break;
|
||||
|
||||
case EAUTH:
|
||||
#ifdef VERIFIED_EXEC_DEBUG_VERBOSE
|
||||
#ifdef MAC_VERIEXEC_DEBUG
|
||||
{
|
||||
char have[MAXFINGERPRINTLEN * 2 + 1];
|
||||
char want[MAXFINGERPRINTLEN * 2 + 1];
|
||||
|
Loading…
Reference in New Issue
Block a user