summaryrefslogtreecommitdiffstats
path: root/sys/sys/ucred.h
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2007-06-07 22:27:15 +0000
committerrwatson <rwatson@FreeBSD.org>2007-06-07 22:27:15 +0000
commit9f332c91ef20b2392e96c3aed469ba04aeb7b13f (patch)
tree23e84b7f5fd5465f12ed2c509373ee128d73a43a /sys/sys/ucred.h
parent1f72bba08402b15a14e6c65f84d0d252f2d2bc1c (diff)
downloadFreeBSD-src-9f332c91ef20b2392e96c3aed469ba04aeb7b13f.zip
FreeBSD-src-9f332c91ef20b2392e96c3aed469ba04aeb7b13f.tar.gz
Move per-process audit state from a pointer in the proc structure to
embedded storage in struct ucred. This allows audit state to be cached with the thread, avoiding locking operations with each system call, and makes it available in asynchronous execution contexts, such as deep in the network stack or VFS. Reviewed by: csjp Approved by: re (kensmith) Obtained from: TrustedBSD Project
Diffstat (limited to 'sys/sys/ucred.h')
-rw-r--r--sys/sys/ucred.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/sys/ucred.h b/sys/sys/ucred.h
index 03cf5f9..1c8e7c8 100644
--- a/sys/sys/ucred.h
+++ b/sys/sys/ucred.h
@@ -33,6 +33,8 @@
#ifndef _SYS_UCRED_H_
#define _SYS_UCRED_H_
+#include <bsm/audit.h>
+
/*
* Credentials.
*
@@ -55,6 +57,7 @@ struct ucred {
struct prison *cr_prison; /* jail(2) */
#define cr_endcopy cr_label
struct label *cr_label; /* MAC label */
+ struct auditinfo_addr cr_audit; /* Audit properties. */
};
#define NOCRED ((struct ucred *)0) /* no credential available */
#define FSCRED ((struct ucred *)-1) /* filesystem credential */
OpenPOWER on IntegriCloud