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.
Reviewed by: dchagin Tested by: trasz MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D28154
This commit is contained in:
parent
19e6043a44
commit
2d423f7671
2 changed files with 6 additions and 0 deletions
|
|
@ -778,6 +778,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