mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
vfs: reduce audit branching in namei_setup
This commit is contained in:
parent
f78cc42f10
commit
cf0fc64bc2
1 changed files with 6 additions and 4 deletions
|
|
@ -372,10 +372,12 @@ namei_setup(struct nameidata *ndp, struct vnode **dpp, struct pwd **pwdp)
|
|||
/*
|
||||
* If we are auditing the kernel pathname, save the user pathname.
|
||||
*/
|
||||
if (cnp->cn_flags & AUDITVNODE1)
|
||||
AUDIT_ARG_UPATH1_VP(td, ndp->ni_rootdir, *dpp, cnp->cn_pnbuf);
|
||||
if (cnp->cn_flags & AUDITVNODE2)
|
||||
AUDIT_ARG_UPATH2_VP(td, ndp->ni_rootdir, *dpp, cnp->cn_pnbuf);
|
||||
if (AUDITING_TD(td)) {
|
||||
if (cnp->cn_flags & AUDITVNODE1)
|
||||
AUDIT_ARG_UPATH1_VP(td, ndp->ni_rootdir, *dpp, cnp->cn_pnbuf);
|
||||
if (cnp->cn_flags & AUDITVNODE2)
|
||||
AUDIT_ARG_UPATH2_VP(td, ndp->ni_rootdir, *dpp, cnp->cn_pnbuf);
|
||||
}
|
||||
if (ndp->ni_startdir != NULL && !startdir_used)
|
||||
vrele(ndp->ni_startdir);
|
||||
if (error != 0) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue