mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
sysent: allow ABI to disable setid on exec.
(cherry picked from commit 2d423f7671)
This commit is contained in:
parent
0379dc900e
commit
ff59c9de32
2 changed files with 6 additions and 0 deletions
|
|
@ -774,6 +774,10 @@ interpret:
|
|||
signotify(td);
|
||||
}
|
||||
|
||||
if (imgp->sysent->sv_setid_allowed != NULL &&
|
||||
!(*imgp->sysent->sv_setid_allowed)(td, imgp))
|
||||
execve_nosetid(imgp);
|
||||
|
||||
/*
|
||||
* Implement image setuid/setgid installation.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -148,6 +148,8 @@ struct sysentvec {
|
|||
void (*sv_onexec)(struct proc *, struct image_params *);
|
||||
void (*sv_onexit)(struct proc *);
|
||||
void (*sv_ontdexit)(struct thread *td);
|
||||
bool (*sv_setid_allowed)(struct thread *td,
|
||||
struct image_params *imgp);
|
||||
};
|
||||
|
||||
#define SV_ILP32 0x000100 /* 32-bit executable. */
|
||||
|
|
|
|||
Loading…
Reference in a new issue