From feeee4c707ab28bab6cd1180144cef39832a1026 Mon Sep 17 00:00:00 2001 From: mjg Date: Sun, 5 Jul 2015 19:05:16 +0000 Subject: fd: make 'rights' a manadatory argument to fget* functions --- sys/security/audit/audit_bsm_klib.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'sys/security/audit') 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 +#include #include #include #include @@ -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'; -- cgit v1.1