Fixed breakage of access() in rev.1.164. Wrong credentials were used for

the final path component.
This commit is contained in:
Bruce Evans 2001-03-20 09:38:05 +00:00
parent 711abb6d69
commit 0abc15fd0b
2 changed files with 2 additions and 2 deletions

View File

@ -1729,7 +1729,7 @@ access(p, uap)
if (SCARG(uap, flags) & X_OK)
flags |= VEXEC;
if ((flags & VWRITE) == 0 || (error = vn_writechk(vp)) == 0)
error = VOP_ACCESS(vp, flags, cred, p);
error = VOP_ACCESS(vp, flags, tmpcred, p);
}
NDFREE(&nd, NDF_ONLY_PNBUF);
vput(vp);

View File

@ -1729,7 +1729,7 @@ access(p, uap)
if (SCARG(uap, flags) & X_OK)
flags |= VEXEC;
if ((flags & VWRITE) == 0 || (error = vn_writechk(vp)) == 0)
error = VOP_ACCESS(vp, flags, cred, p);
error = VOP_ACCESS(vp, flags, tmpcred, p);
}
NDFREE(&nd, NDF_ONLY_PNBUF);
vput(vp);