Add a MAC check for VOP_LOOKUP() in the Linux getwcd() implementation.
Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories
This commit is contained in:
parent
0543fa5398
commit
0b92da272c
@ -162,7 +162,11 @@ linux_getcwd_scandir(lvpp, uvpp, bpp, bufp, td)
|
||||
* At this point, lvp is locked and will be unlocked by the lookup.
|
||||
* On successful return, *uvpp will be locked
|
||||
*/
|
||||
error = VOP_LOOKUP(lvp, uvpp, &cn);
|
||||
#ifdef MAC
|
||||
error = mac_check_vnode_lookup(td->td_ucred, lvp, &cn);
|
||||
if (error == 0)
|
||||
#endif
|
||||
error = VOP_LOOKUP(lvp, uvpp, &cn);
|
||||
if (error) {
|
||||
vput(lvp);
|
||||
*lvpp = NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user