MCPcopy Create free account
hub / github.com/F-Stack/f-stack / sys___mac_execve

Function sys___mac_execve

freebsd/kern/kern_exec.c:271–292  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

269#endif
270
271int
272sys___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
294int
295pre_execve(struct thread *td, struct vmspace **oldvmspace)

Callers

nothing calls this directly

Calls 4

pre_execveFunction · 0.85
exec_copyin_argsFunction · 0.85
kern_execveFunction · 0.85
post_execveFunction · 0.85

Tested by

no test coverage detected