process-util: introduce trivial proc_set_nnp() helper
This commit is contained in:
@@ -2292,3 +2292,7 @@ int prctl_safe(int op, unsigned long arg2, unsigned long arg3, unsigned long arg
|
||||
int proc_set_comm(const char *comm) {
|
||||
return prctl_safe(PR_SET_NAME, (unsigned long) comm, 0, 0, 0);
|
||||
}
|
||||
|
||||
int proc_set_nnp(void) {
|
||||
return prctl_safe(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0);
|
||||
}
|
||||
|
||||
@@ -259,3 +259,4 @@ int read_errno(int errno_fd);
|
||||
int prctl_safe(int op, unsigned long arg2, unsigned long arg3, unsigned long arg4, unsigned long arg5);
|
||||
|
||||
int proc_set_comm(const char *comm);
|
||||
int proc_set_nnp(void);
|
||||
|
||||
Reference in New Issue
Block a user