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
@ -778,6 +778,10 @@ interpret:
|
|||||||
signotify(td);
|
signotify(td);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (imgp->sysent->sv_setid_allowed != NULL &&
|
||||||
|
!(*imgp->sysent->sv_setid_allowed)(td, imgp))
|
||||||
|
execve_nosetid(imgp);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Implement image setuid/setgid installation.
|
* Implement image setuid/setgid installation.
|
||||||
*/
|
*/
|
||||||
|
@ -148,6 +148,8 @@ struct sysentvec {
|
|||||||
void (*sv_onexec)(struct proc *, struct image_params *);
|
void (*sv_onexec)(struct proc *, struct image_params *);
|
||||||
void (*sv_onexit)(struct proc *);
|
void (*sv_onexit)(struct proc *);
|
||||||
void (*sv_ontdexit)(struct thread *td);
|
void (*sv_ontdexit)(struct thread *td);
|
||||||
|
bool (*sv_setid_allowed)(struct thread *td,
|
||||||
|
struct image_params *imgp);
|
||||||
};
|
};
|
||||||
|
|
||||||
#define SV_ILP32 0x000100 /* 32-bit executable. */
|
#define SV_ILP32 0x000100 /* 32-bit executable. */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user