diff options
author | jhb <jhb@FreeBSD.org> | 2006-07-19 18:30:33 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2006-07-19 18:30:33 +0000 |
commit | 5ee36b60d1ea2b8c1617a2950f5a290232431241 (patch) | |
tree | d500d9383f9111b4e76e1c29ad8c17d928d2b864 /sys/kern/vfs_extattr.c | |
parent | 947b8c9fbd64c828ef441411fff4f0ce542a99e2 (diff) | |
download | FreeBSD-src-5ee36b60d1ea2b8c1617a2950f5a290232431241.zip FreeBSD-src-5ee36b60d1ea2b8c1617a2950f5a290232431241.tar.gz |
Call change_dir() instead of duplicating the code in fchdir().
Diffstat (limited to 'sys/kern/vfs_extattr.c')
-rw-r--r-- | sys/kern/vfs_extattr.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/sys/kern/vfs_extattr.c b/sys/kern/vfs_extattr.c index e9f83f0..1db8a49 100644 --- a/sys/kern/vfs_extattr.c +++ b/sys/kern/vfs_extattr.c @@ -697,14 +697,7 @@ fchdir(td, uap) vfslocked = VFS_LOCK_GIANT(vp->v_mount); vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, td); AUDIT_ARG(vnode, vp, ARG_VNODE1); - if (vp->v_type != VDIR) - error = ENOTDIR; -#ifdef MAC - else if ((error = mac_check_vnode_chdir(td->td_ucred, vp)) != 0) { - } -#endif - else - error = VOP_ACCESS(vp, VEXEC, td->td_ucred, td); + error = change_dir(vp, td); while (!error && (mp = vp->v_mountedhere) != NULL) { int tvfslocked; if (vfs_busy(mp, 0, 0, td)) |