diff options
Diffstat (limited to 'sys/kern/kern_exec.c')
-rw-r--r-- | sys/kern/kern_exec.c | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c index 341033c0fcdcc..430837ca86290 100644 --- a/sys/kern/kern_exec.c +++ b/sys/kern/kern_exec.c @@ -113,15 +113,6 @@ execve(p, uap) imgp = &image_params; /* - * Lock the process and set the P_INEXEC flag to indicate that - * it should be left alone until we're done here. This is - * necessary to avoid race conditions - e.g. in ptrace() - - * that might allow a local user to illicitly obtain elevated - * privileges. - */ - p->p_flag |= P_INEXEC; - - /* * Initialize part of the common data */ imgp->proc = p; @@ -352,12 +343,10 @@ interpret: VREF(ndp->ni_vp); p->p_textvp = ndp->ni_vp; - /* - * Notify others that we exec'd, and clear the P_INEXEC flag - * as we're now a bona fide freshly-execed process. - */ + /* + * notify others that we exec'd + */ KNOTE(&p->p_klist, NOTE_EXEC); - p->p_flag &= ~P_INEXEC; /* * If tracing the process, trap to debugger so breakpoints @@ -411,8 +400,6 @@ exec_fail_dealloc: return (0); exec_fail: - /* we're done here, clear P_INEXEC */ - p->p_flag &= ~P_INEXEC; if (imgp->vmspace_destroyed) { /* sorry, no more process anymore. exit gracefully */ exit1(p, W_EXITCODE(0, SIGABRT)); |