diff options
author | Alexandra Hájková <alexandra.khirnova@gmail.com> | 2021-05-03 16:35:10 +0000 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2021-05-03 16:46:06 -0300 |
commit | 19d83270fcd993cc349570164e21b06d57036704 (patch) | |
tree | 3b792ec90a694a69046fe4858d5f408fcb9e41ff /posix/unistd.h | |
parent | 1427d28e3008e2d2d467883a14a24df6a40b82b1 (diff) | |
download | glibc-19d83270fcd993cc349570164e21b06d57036704.tar.gz glibc-19d83270fcd993cc349570164e21b06d57036704.tar.xz glibc-19d83270fcd993cc349570164e21b06d57036704.zip |
linux: Add execveat system call wrapper
It operates similar to execve and it is is already used to implement fexecve without requiring /proc to be mounted. However, different than fexecve, if the syscall is not supported by the kernel an error is returned instead of trying a fallback. Checked on x86_64-linux-gnu and powerpc64le-linux-gnu. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Diffstat (limited to 'posix/unistd.h')
-rw-r--r-- | posix/unistd.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/posix/unistd.h b/posix/unistd.h index 3f22763379..d9d8929f71 100644 --- a/posix/unistd.h +++ b/posix/unistd.h @@ -295,6 +295,11 @@ extern int euidaccess (const char *__name, int __type) /* An alias for `euidaccess', used by some other systems. */ extern int eaccess (const char *__name, int __type) __THROW __nonnull ((1)); + +/* Execute program relative to a directory file descriptor. */ +extern int execveat (int __fd, const char *__path, char *const __argv[], + char *const __envp[], int __flags) + __THROW __nonnull ((2, 3)); #endif #ifdef __USE_ATFILE |