aboutsummaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/wrapfuncs.c2
-rw-r--r--templates/wrapfuncs.h11
-rw-r--r--templates/wrapper_table15
3 files changed, 27 insertions, 1 deletions
diff --git a/templates/wrapfuncs.c b/templates/wrapfuncs.c
index c0170d9..61065c5 100644
--- a/templates/wrapfuncs.c
+++ b/templates/wrapfuncs.c
@@ -30,7 +30,7 @@ ${name}(${decl_args}) {
sigprocmask(SIG_SETMASK, &saved, NULL);
${def_return}
}
- if (pseudo_populate_wrappers()) {
+ if (pseudo_check_wrappers()) {
int save_errno;
if (antimagic > 0) {
if (real_$name) {
diff --git a/templates/wrapfuncs.h b/templates/wrapfuncs.h
index 8088d09..403d261 100644
--- a/templates/wrapfuncs.h
+++ b/templates/wrapfuncs.h
@@ -14,5 +14,16 @@ static ${type} (*real_${name})(${decl_args});
/* int fork(void) */
static int wrap_fork(void);
static int (*real_fork)(void);
+/* int clone(int (*fn)(void *), void *child_stack, int flags, void *arg, ...) */
static int wrap_clone(int (*fn)(void *), void *child_stack, int flags, void *arg, ...);
static int (*real_clone)(int (*fn)(void *), void *child_stack, int flags, void *arg, ...);
+/* int execv(const char *file, char *const *argv) */
+static int wrap_execv(const char *file, char *const *argv);
+static int (*real_execv)(const char *file, char *const *argv);
+/* int execve(const char *file, char *const *argv, char *const *envp) */
+static int wrap_execve(const char *file, char *const *argv, char *const *envp);
+static int (*real_execve)(const char *file, char *const *argv, char *const *envp);
+/* int execvp(const char *file, char *const *argv) */
+static int wrap_execvp(const char *file, char *const *argv);
+static int (*real_execvp)(const char *file, char *const *argv);
+
diff --git a/templates/wrapper_table b/templates/wrapper_table
index f1a3220..dd9c249 100644
--- a/templates/wrapper_table
+++ b/templates/wrapper_table
@@ -27,5 +27,20 @@ static struct {
(int (**)(void)) &real_clone,
(int (*)(void)) wrap_clone
},
+ { /* int execv(const char *file, char *const *argv); */
+ "execv",
+ (int (**)(void)) &real_execv,
+ (int (*)(void)) wrap_execv
+ },
+ { /* int execve(const char *file, char *const *argv, char *const *envp); */
+ "execve",
+ (int (**)(void)) &real_execve,
+ (int (*)(void)) wrap_execve
+ },
+ { /* int execvp(const char *file, char *const *argv); */
+ "execvp",
+ (int (**)(void)) &real_execvp,
+ (int (*)(void)) wrap_execvp
+ },
{ NULL, NULL, NULL },
};