diff options
Diffstat (limited to 'libsandbox')
-rw-r--r-- | libsandbox/symbols.h.in | 2 | ||||
-rw-r--r-- | libsandbox/wrapper-funcs/execveat.c | 13 | ||||
-rw-r--r-- | libsandbox/wrapper-funcs/execvpe.c | 12 |
3 files changed, 27 insertions, 0 deletions
diff --git a/libsandbox/symbols.h.in b/libsandbox/symbols.h.in index e34b977..bdbce08 100644 --- a/libsandbox/symbols.h.in +++ b/libsandbox/symbols.h.in @@ -62,7 +62,9 @@ mkstemps64 #execlp execv execve +execveat execvp +execvpe fexecve system popen diff --git a/libsandbox/wrapper-funcs/execveat.c b/libsandbox/wrapper-funcs/execveat.c new file mode 100644 index 0000000..70ac0bd --- /dev/null +++ b/libsandbox/wrapper-funcs/execveat.c @@ -0,0 +1,13 @@ +/* + * execve() wrapper. + * + * Copyright 1999-2015 Gentoo Foundation + * Licensed under the GPL-2 + */ + +#define WRAPPER_ARGS_PROTO int dirfd, const char *path, char *const argv[], char *const envp[], int flags +#define WRAPPER_ARGS dirfd, path, argv, envp, flags +#define EXEC_ARGS dirfd, path, argv, my_env, flags +#define EXEC_MY_ENV +#define EXEC_NO_PATH +#include "__wrapper_exec.c" diff --git a/libsandbox/wrapper-funcs/execvpe.c b/libsandbox/wrapper-funcs/execvpe.c new file mode 100644 index 0000000..3402043 --- /dev/null +++ b/libsandbox/wrapper-funcs/execvpe.c @@ -0,0 +1,12 @@ +/* + * execvpe() wrapper. + * + * Copyright 1999-2015 Gentoo Foundation + * Licensed under the GPL-2 + */ + +#define WRAPPER_ARGS_PROTO const char *path, char *const argv[], char *const envp[] +#define WRAPPER_ARGS path, argv, envp +#define EXEC_ARGS path, argv, my_env +#define EXEC_MY_ENV +#include "__wrapper_exec.c" |