summaryrefslogtreecommitdiffstats
path: root/sys/security/audit/audit_arg.c
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2009-07-28 21:39:58 +0000
committerrwatson <rwatson@FreeBSD.org>2009-07-28 21:39:58 +0000
commit21e3bcee4378f043e902dc1bab9ac2915235f40a (patch)
tree441a5395402f45cf8439af427c181e056625d4f4 /sys/security/audit/audit_arg.c
parentfa74d2c7e54f546f30ebc8df6467929fa74d72f6 (diff)
downloadFreeBSD-src-21e3bcee4378f043e902dc1bab9ac2915235f40a.zip
FreeBSD-src-21e3bcee4378f043e902dc1bab9ac2915235f40a.tar.gz
Audit file descriptors passed to fooat(2) system calls, which are used
instead of the root/current working directory as the starting point for lookups. Up to two such descriptors can be audited. Add audit record BSM encoding for fooat(2). Note: due to an error in the OpenBSM 1.1p1 configuration file, a further change is required to that file in order to fix openat(2) auditing. Approved by: re (kib) Reviewed by: rdivacky (fooat(2) portions) Obtained from: TrustedBSD Project MFC after: 1 month
Diffstat (limited to 'sys/security/audit/audit_arg.c')
-rw-r--r--sys/security/audit/audit_arg.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/sys/security/audit/audit_arg.c b/sys/security/audit/audit_arg.c
index cf62421..bf4cb0a 100644
--- a/sys/security/audit/audit_arg.c
+++ b/sys/security/audit/audit_arg.c
@@ -101,6 +101,32 @@ audit_arg_len(int len)
}
void
+audit_arg_atfd1(int atfd)
+{
+ struct kaudit_record *ar;
+
+ ar = currecord();
+ if (ar == NULL)
+ return;
+
+ ar->k_ar.ar_arg_atfd1 = atfd;
+ ARG_SET_VALID(ar, ARG_ATFD1);
+}
+
+void
+audit_arg_atfd2(int atfd)
+{
+ struct kaudit_record *ar;
+
+ ar = currecord();
+ if (ar == NULL)
+ return;
+
+ ar->k_ar.ar_arg_atfd2 = atfd;
+ ARG_SET_VALID(ar, ARG_ATFD2);
+}
+
+void
audit_arg_fd(int fd)
{
struct kaudit_record *ar;
OpenPOWER on IntegriCloud