summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_alq.c
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2009-06-21 13:41:32 +0000
committerkib <kib@FreeBSD.org>2009-06-21 13:41:32 +0000
commit171c37f865ca934d583ae77a7edb3e6818a364bb (patch)
tree548a61c5fc4bd14c03a515783550b0e6868c9c0b /sys/kern/kern_alq.c
parentb91bec2bd9b4fd4d1c040ca5254dc4b95c6c9ee1 (diff)
downloadFreeBSD-src-171c37f865ca934d583ae77a7edb3e6818a364bb.zip
FreeBSD-src-171c37f865ca934d583ae77a7edb3e6818a364bb.tar.gz
Add another flags argument to vn_open_cred. Use it to specify that some
vn_open_cred invocations shall not audit namei path. In particular, specify VN_OPEN_NOAUDIT for dotdot lookup performed by default implementation of vop_vptocnp, and for the open done for core file. vn_fullpath is called from the audit code, and vn_open there need to disable audit to avoid infinite recursion. Core file is created on return to user mode, that, in particular, happens during syscall return. The creation of the core file is audited by direct calls, and we do not want to overwrite audit information for syscall. Reported, reviewed and tested by: rwatson
Diffstat (limited to 'sys/kern/kern_alq.c')
-rw-r--r--sys/kern/kern_alq.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/kern_alq.c b/sys/kern/kern_alq.c
index 5296928..a4ece79 100644
--- a/sys/kern/kern_alq.c
+++ b/sys/kern/kern_alq.c
@@ -351,7 +351,7 @@ alq_open(struct alq **alqp, const char *file, struct ucred *cred, int cmode,
NDINIT(&nd, LOOKUP, NOFOLLOW | MPSAFE, UIO_SYSSPACE, file, td);
flags = FWRITE | O_NOFOLLOW | O_CREAT;
- error = vn_open_cred(&nd, &flags, cmode, cred, NULL);
+ error = vn_open_cred(&nd, &flags, cmode, 0, cred, NULL);
if (error)
return (error);
OpenPOWER on IntegriCloud