Correct the logic broken in my last commit.

Reported by:	tijl
This commit is contained in:
Pawel Jakub Dawidek 2013-09-05 09:36:19 +00:00
parent d983befd2f
commit 44fcd367c5
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=255236

View File

@ -920,7 +920,7 @@ change_dir(vp, td)
return (ENOTDIR);
#ifdef MAC
error = mac_vnode_check_chdir(td->td_ucred, vp);
if (error == 0)
if (error != 0)
return (error);
#endif
return (VOP_ACCESS(vp, VEXEC, td->td_ucred, td));