In execve(), audit the path name being executed. In the future, it

would also be good to audit the interpreter pathname, if any.

Obtained from:	TrustedBSD Project
This commit is contained in:
Robert Watson 2006-05-28 08:28:47 +00:00
parent 0e1c7fb8ea
commit 4bb260ad78

View File

@ -353,8 +353,8 @@ do_execve(td, args, mac_p)
* in ni_vp amoung other things.
*/
ndp = &nd;
NDINIT(ndp, LOOKUP, ISOPEN | LOCKLEAF | FOLLOW | SAVENAME | MPSAFE,
UIO_SYSSPACE, args->fname, td);
NDINIT(ndp, LOOKUP, ISOPEN | LOCKLEAF | FOLLOW | SAVENAME | MPSAFE |
AUDITVNODE1, UIO_SYSSPACE, args->fname, td);
interpret:
error = namei(ndp);