summaryrefslogtreecommitdiffstats
path: root/sys/fs
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2009-06-21 19:21:01 +0000
committerkib <kib@FreeBSD.org>2009-06-21 19:21:01 +0000
commit2fc79768f33d575d200ae1482dc23207f9d93703 (patch)
tree16815288a4df4ec66279d1a1e04aabcdf84a88c9 /sys/fs
parentb69e15d521bbb1550dc659223e33c2343e332269 (diff)
downloadFreeBSD-src-2fc79768f33d575d200ae1482dc23207f9d93703.zip
FreeBSD-src-2fc79768f33d575d200ae1482dc23207f9d93703.tar.gz
Add explicit struct ucred * argument for VOP_VPTOCNP, to be used by
vn_open_cred in default implementation. Valid struct ucred is needed for audit and MAC, and curthread credentials may be wrong. This further requires modifying the interface of vn_fullpath(9), but it is out of scope of this change. Reviewed by: rwatson
Diffstat (limited to 'sys/fs')
-rw-r--r--sys/fs/nullfs/null_vnops.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/fs/nullfs/null_vnops.c b/sys/fs/nullfs/null_vnops.c
index 36eee63..a028b63 100644
--- a/sys/fs/nullfs/null_vnops.c
+++ b/sys/fs/nullfs/null_vnops.c
@@ -747,6 +747,7 @@ null_vptocnp(struct vop_vptocnp_args *ap)
struct vnode *vp = ap->a_vp;
struct vnode **dvp = ap->a_vpp;
struct vnode *lvp, *ldvp;
+ struct ucred *cred = ap->a_cred;
int error, locked;
if (vp->v_type == VDIR)
@@ -757,7 +758,7 @@ null_vptocnp(struct vop_vptocnp_args *ap)
vhold(lvp);
VOP_UNLOCK(vp, 0); /* vp is held by vn_vptocnp_locked that called us */
ldvp = lvp;
- error = vn_vptocnp(&ldvp, ap->a_buf, ap->a_buflen);
+ error = vn_vptocnp(&ldvp, cred, ap->a_buf, ap->a_buflen);
vdrop(lvp);
if (error != 0) {
vn_lock(vp, locked | LK_RETRY);
OpenPOWER on IntegriCloud