summaryrefslogtreecommitdiffstats
path: root/sys/security/audit
diff options
context:
space:
mode:
authormjg <mjg@FreeBSD.org>2015-07-05 19:05:16 +0000
committermjg <mjg@FreeBSD.org>2015-07-05 19:05:16 +0000
commitfeeee4c707ab28bab6cd1180144cef39832a1026 (patch)
tree722b04d655f398679c92441c3c43074c329a9d73 /sys/security/audit
parent35acf35c2e04ac9da20ebfb09e37b5b73f2b04fa (diff)
downloadFreeBSD-src-feeee4c707ab28bab6cd1180144cef39832a1026.zip
FreeBSD-src-feeee4c707ab28bab6cd1180144cef39832a1026.tar.gz
fd: make 'rights' a manadatory argument to fget* functions
Diffstat (limited to 'sys/security/audit')
-rw-r--r--sys/security/audit/audit_bsm_klib.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/security/audit/audit_bsm_klib.c b/sys/security/audit/audit_bsm_klib.c
index 2f5a92e..b687a15 100644
--- a/sys/security/audit/audit_bsm_klib.c
+++ b/sys/security/audit/audit_bsm_klib.c
@@ -32,6 +32,7 @@
__FBSDID("$FreeBSD$");
#include <sys/param.h>
+#include <sys/capsicum.h>
#include <sys/fcntl.h>
#include <sys/filedesc.h>
#include <sys/libkern.h>
@@ -467,6 +468,7 @@ audit_canon_path(struct thread *td, int dirfd, char *path, char *cpath)
char *rbuf, *fbuf, *copy;
struct filedesc *fdp;
struct sbuf sbf;
+ cap_rights_t rights;
int error, needslash;
WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, NULL, "%s: at %s:%d",
@@ -495,7 +497,7 @@ audit_canon_path(struct thread *td, int dirfd, char *path, char *cpath)
vhold(cvnp);
} else {
/* XXX: fgetvp() that vhold()s vnode instead of vref()ing it would be better */
- error = fgetvp(td, dirfd, NULL, &cvnp);
+ error = fgetvp(td, dirfd, cap_rights_init(&rights), &cvnp);
if (error) {
FILEDESC_SUNLOCK(fdp);
cpath[0] = '\0';
OpenPOWER on IntegriCloud