diff options
Diffstat (limited to 'sys/security')
-rw-r--r-- | sys/security/audit/audit_bsm_klib.c | 4 |
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'; |