Merge pull request #17079 from keszybz/late-exec-resolution
Resolve executable paths before execution, use fexecve()
This commit is contained in:
@@ -749,6 +749,25 @@ static inline int missing_rt_sigqueueinfo(pid_t tgid, int sig, siginfo_t *info)
|
||||
# define rt_sigqueueinfo missing_rt_sigqueueinfo
|
||||
#endif
|
||||
|
||||
/* ======================================================================= */
|
||||
|
||||
#if !HAVE_EXECVEAT
|
||||
static inline int missing_execveat(int dirfd, const char *pathname,
|
||||
char *const argv[], char *const envp[],
|
||||
int flags) {
|
||||
# if defined __NR_execveat && __NR_execveat >= 0
|
||||
return syscall(__NR_execveat, dirfd, pathname, argv, envp, flags);
|
||||
# else
|
||||
errno = ENOSYS;
|
||||
return -1;
|
||||
# endif
|
||||
}
|
||||
|
||||
# undef AT_EMPTY_PATH
|
||||
# define AT_EMPTY_PATH 0x1000
|
||||
# define execveat missing_execveat
|
||||
#endif
|
||||
|
||||
/* ======================================================================= */
|
||||
|
||||
#define systemd_NR_close_range systemd_SC_arch_bias(436)
|
||||
|
||||
Reference in New Issue
Block a user