Changeset View
Changeset View
Standalone View
Standalone View
sys/kern/kern_exec.c
Show First 20 Lines • Show All 772 Lines • ▼ Show 20 Lines | if ((p->p_flag2 & P2_STKGAP_DISABLE_EXEC) == 0) | ||||
p->p_flag2 &= ~P2_STKGAP_DISABLE; | p->p_flag2 &= ~P2_STKGAP_DISABLE; | ||||
if (p->p_flag & P_PPWAIT) { | if (p->p_flag & P_PPWAIT) { | ||||
p->p_flag &= ~(P_PPWAIT | P_PPTRACE); | p->p_flag &= ~(P_PPWAIT | P_PPTRACE); | ||||
cv_broadcast(&p->p_pwait); | cv_broadcast(&p->p_pwait); | ||||
/* STOPs are no longer ignored, arrange for AST */ | /* STOPs are no longer ignored, arrange for AST */ | ||||
signotify(td); | signotify(td); | ||||
} | } | ||||
if (imgp->sysent->sv_setid_allowed != NULL && | if ((imgp->sysent->sv_setid_allowed != NULL && | ||||
!(*imgp->sysent->sv_setid_allowed)(td, imgp)) | !(*imgp->sysent->sv_setid_allowed)(td, imgp)) || | ||||
(p->p_flag2 & P2_NO_NEW_PRIVS) != 0) | |||||
execve_nosetid(imgp); | execve_nosetid(imgp); | ||||
/* | /* | ||||
kib: `() != 0`
IMO the condition should be merged into previous if() | |||||
* Implement image setuid/setgid installation. | * Implement image setuid/setgid installation. | ||||
*/ | */ | ||||
if (imgp->credential_setid) { | if (imgp->credential_setid) { | ||||
/* | /* | ||||
* Turn off syscall tracing for set-id programs, except for | * Turn off syscall tracing for set-id programs, except for | ||||
* root. Record any set-id flags first to make sure that | * root. Record any set-id flags first to make sure that | ||||
* we do not regain any tracing during a possible block. | * we do not regain any tracing during a possible block. | ||||
*/ | */ | ||||
▲ Show 20 Lines • Show All 1,230 Lines • Show Last 20 Lines |
() != 0
IMO the condition should be merged into previous if()