aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorRobert Watson <rwatson@FreeBSD.org>2009-07-01 16:56:56 +0000
committerRobert Watson <rwatson@FreeBSD.org>2009-07-01 16:56:56 +0000
commit6d5a61563a0e58d0ce62b1fe263abb64c7369d7a (patch)
tree17df965f74c1db32b96f98787ed33d0f1a9ef39d /sys
parenta4c5a1c3156f8dcecccb1be158df3157a2e5f692 (diff)
Notes
Diffstat (limited to 'sys')
-rw-r--r--sys/kern/vfs_mount.c4
-rw-r--r--sys/security/audit/audit_bsm.c8
2 files changed, 11 insertions, 1 deletions
diff --git a/sys/kern/vfs_mount.c b/sys/kern/vfs_mount.c
index 10691a4e3dc0..7a137197cca8 100644
--- a/sys/kern/vfs_mount.c
+++ b/sys/kern/vfs_mount.c
@@ -1113,6 +1113,7 @@ unmount(td, uap)
char *pathbuf;
int error, id0, id1;
+ AUDIT_ARG_VALUE(uap->flags);
if (jailed(td->td_ucred) || usermount == 0) {
error = priv_check(td, PRIV_VFS_UNMOUNT);
if (error)
@@ -1125,9 +1126,9 @@ unmount(td, uap)
free(pathbuf, M_TEMP);
return (error);
}
- AUDIT_ARG_UPATH(td, pathbuf, ARG_UPATH1);
mtx_lock(&Giant);
if (uap->flags & MNT_BYFSID) {
+ AUDIT_ARG_TEXT(pathbuf);
/* Decode the filesystem ID. */
if (sscanf(pathbuf, "FSID:%d:%d", &id0, &id1) != 2) {
mtx_unlock(&Giant);
@@ -1143,6 +1144,7 @@ unmount(td, uap)
}
mtx_unlock(&mountlist_mtx);
} else {
+ AUDIT_ARG_UPATH(td, pathbuf, ARG_UPATH1);
mtx_lock(&mountlist_mtx);
TAILQ_FOREACH_REVERSE(mp, &mountlist, mntlist, mnt_list) {
if (strcmp(mp->mnt_stat.f_mntonname, pathbuf) == 0)
diff --git a/sys/security/audit/audit_bsm.c b/sys/security/audit/audit_bsm.c
index 1eb9679fa364..4b2b6f12104c 100644
--- a/sys/security/audit/audit_bsm.c
+++ b/sys/security/audit/audit_bsm.c
@@ -1070,7 +1070,15 @@ kaudit_to_bsm(struct kaudit_record *kar, struct au_record **pau)
break;
case AUE_UMOUNT:
+ if (ARG_IS_VALID(kar, ARG_VALUE)) {
+ tok = au_to_arg32(1, "flags", ar->ar_arg_value);
+ kau_write(rec, tok);
+ }
UPATH1_VNODE1_TOKENS;
+ if (ARG_IS_VALID(kar, ARG_TEXT)) {
+ tok = au_to_text(ar->ar_arg_text);
+ kau_write(rec, tok);
+ }
break;
case AUE_MSGCTL: