diff options
| author | Robert Watson <rwatson@FreeBSD.org> | 2002-08-01 14:31:58 +0000 |
|---|---|---|
| committer | Robert Watson <rwatson@FreeBSD.org> | 2002-08-01 14:31:58 +0000 |
| commit | 339b79b93959d926312e63cd03a49b7d6885b418 (patch) | |
| tree | 439d8849baf98bb2272fec17d9f9f573c3116064 /sys/kern/kern_exec.c | |
| parent | abc1263a51bccf7869a90eb5093f19503d497363 (diff) | |
Notes
Diffstat (limited to 'sys/kern/kern_exec.c')
| -rw-r--r-- | sys/kern/kern_exec.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c index 14f5badfb11d..0d6689fff135 100644 --- a/sys/kern/kern_exec.c +++ b/sys/kern/kern_exec.c @@ -27,6 +27,7 @@ */ #include "opt_ktrace.h" +#include "opt_mac.h" #include <sys/param.h> #include <sys/systm.h> @@ -35,6 +36,7 @@ #include <sys/sysproto.h> #include <sys/signalvar.h> #include <sys/kernel.h> +#include <sys/mac.h> #include <sys/mount.h> #include <sys/filedesc.h> #include <sys/fcntl.h> @@ -909,6 +911,13 @@ exec_check_permissions(imgp) int error; td = curthread; /* XXXKSE */ + +#ifdef MAC + error = mac_check_vnode_exec(td->td_ucred, imgp->vp); + if (error) + return (error); +#endif + /* Get file attributes */ error = VOP_GETATTR(vp, attr, td->td_ucred, td); if (error) |
