diff options
author | rwatson <rwatson@FreeBSD.org> | 2009-06-27 13:58:44 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2009-06-27 13:58:44 +0000 |
commit | da78c9e4a2e1689a4d400553bb5f6aa0537c5f49 (patch) | |
tree | 18c823b27ab8bd9a1cd03dcca0ea5348975f3971 /sys/kern/vfs_lookup.c | |
parent | 3b6551a921beb7f1408f05c3730aa5802bd6e79c (diff) | |
download | FreeBSD-src-da78c9e4a2e1689a4d400553bb5f6aa0537c5f49.zip FreeBSD-src-da78c9e4a2e1689a4d400553bb5f6aa0537c5f49.tar.gz |
Replace AUDIT_ARG() with variable argument macros with a set more more
specific macros for each audit argument type. This makes it easier to
follow call-graphs, especially for automated analysis tools (such as
fxr).
In MFC, we should leave the existing AUDIT_ARG() macros as they may be
used by third-party kernel modules.
Suggested by: brooks
Approved by: re (kib)
Obtained from: TrustedBSD Project
MFC after: 1 week
Diffstat (limited to 'sys/kern/vfs_lookup.c')
-rw-r--r-- | sys/kern/vfs_lookup.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/sys/kern/vfs_lookup.c b/sys/kern/vfs_lookup.c index 85173eda..e154c56 100644 --- a/sys/kern/vfs_lookup.c +++ b/sys/kern/vfs_lookup.c @@ -164,9 +164,9 @@ namei(struct nameidata *ndp) /* If we are auditing the kernel pathname, save the user pathname. */ if (cnp->cn_flags & AUDITVNODE1) - AUDIT_ARG(upath, td, cnp->cn_pnbuf, ARG_UPATH1); + AUDIT_ARG_UPATH(td, cnp->cn_pnbuf, ARG_UPATH1); if (cnp->cn_flags & AUDITVNODE2) - AUDIT_ARG(upath, td, cnp->cn_pnbuf, ARG_UPATH2); + AUDIT_ARG_UPATH(td, cnp->cn_pnbuf, ARG_UPATH2); /* * Don't allow empty pathnames. @@ -460,9 +460,6 @@ lookup(struct nameidata *ndp) int dvfslocked; /* VFS Giant state for parent */ int tvfslocked; int lkflags_save; -#ifdef AUDIT - struct thread *td = curthread; -#endif /* * Setup: break out flag bits into variables. @@ -572,9 +569,9 @@ dirloop: ndp->ni_vp = dp; if (cnp->cn_flags & AUDITVNODE1) - AUDIT_ARG(vnode, dp, ARG_VNODE1); + AUDIT_ARG_VNODE(dp, ARG_VNODE1); else if (cnp->cn_flags & AUDITVNODE2) - AUDIT_ARG(vnode, dp, ARG_VNODE2); + AUDIT_ARG_VNODE(dp, ARG_VNODE2); if (!(cnp->cn_flags & (LOCKPARENT | LOCKLEAF))) VOP_UNLOCK(dp, 0); @@ -857,9 +854,9 @@ nextname: VOP_UNLOCK(ndp->ni_dvp, 0); if (cnp->cn_flags & AUDITVNODE1) - AUDIT_ARG(vnode, dp, ARG_VNODE1); + AUDIT_ARG_VNODE(dp, ARG_VNODE1); else if (cnp->cn_flags & AUDITVNODE2) - AUDIT_ARG(vnode, dp, ARG_VNODE2); + AUDIT_ARG_VNODE(dp, ARG_VNODE2); if ((cnp->cn_flags & LOCKLEAF) == 0) VOP_UNLOCK(dp, 0); |