Drop in the MAC check for file creation as part of open().
Approved by: re Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories
This commit is contained in:
parent
9aeffb2b28
commit
89c61753a0
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=105475
@ -140,9 +140,17 @@ vn_open_cred(ndp, flagp, cmode, cred)
|
||||
return (error);
|
||||
goto restart;
|
||||
}
|
||||
VOP_LEASE(ndp->ni_dvp, td, cred, LEASE_WRITE);
|
||||
error = VOP_CREATE(ndp->ni_dvp, &ndp->ni_vp,
|
||||
&ndp->ni_cnd, vap);
|
||||
#ifdef MAC
|
||||
error = mac_check_vnode_create(cred, ndp->ni_dvp,
|
||||
&ndp->ni_cnd, vap);
|
||||
if (error == 0) {
|
||||
#endif
|
||||
VOP_LEASE(ndp->ni_dvp, td, cred, LEASE_WRITE);
|
||||
error = VOP_CREATE(ndp->ni_dvp, &ndp->ni_vp,
|
||||
&ndp->ni_cnd, vap);
|
||||
#ifdef MAC
|
||||
}
|
||||
#endif
|
||||
vput(ndp->ni_dvp);
|
||||
vn_finished_write(mp);
|
||||
if (error) {
|
||||
|
Loading…
Reference in New Issue
Block a user