| 269 | #endif |
| 270 | |
| 271 | int |
| 272 | sys___mac_execve(struct thread *td, struct __mac_execve_args *uap) |
| 273 | { |
| 274 | #ifdef MAC |
| 275 | struct image_args args; |
| 276 | struct vmspace *oldvmspace; |
| 277 | int error; |
| 278 | |
| 279 | error = pre_execve(td, &oldvmspace); |
| 280 | if (error != 0) |
| 281 | return (error); |
| 282 | error = exec_copyin_args(&args, uap->fname, UIO_USERSPACE, |
| 283 | uap->argv, uap->envv); |
| 284 | if (error == 0) |
| 285 | error = kern_execve(td, &args, uap->mac_p, oldvmspace); |
| 286 | post_execve(td, error, oldvmspace); |
| 287 | AUDIT_SYSCALL_EXIT(error == EJUSTRETURN ? 0 : error, td); |
| 288 | return (error); |
| 289 | #else |
| 290 | return (ENOSYS); |
| 291 | #endif |
| 292 | } |
| 293 | |
| 294 | int |
| 295 | pre_execve(struct thread *td, struct vmspace **oldvmspace) |
nothing calls this directly
no test coverage detected