Also interpose system(3). On glibc systems you cannot interpose

the syscalls used internally by libc.
This commit is contained in:
Todd C. Miller
2015-09-28 15:10:00 -06:00
parent 04457ecee9
commit 8695ae1049

View File

@@ -61,6 +61,12 @@ typedef struct interpose_s {
return -1; \
}
#define DUMMY1(fn, t1) \
__dso_public int \
FN_NAME(fn)(t1 a1) \
DUMMY_BODY \
INTERPOSE(fn)
#define DUMMY2(fn, t1, t2) \
__dso_public int \
FN_NAME(fn)(t1 a1, t2 a2) \
@@ -91,6 +97,7 @@ INTERPOSE(fn)
DUMMY_VA(execl, const char *, const char *)
DUMMY_VA(execle, const char *, const char *)
DUMMY_VA(execlp, const char *, const char *)
DUMMY1(system, const char *)
DUMMY2(execv, const char *, char * const *)
DUMMY2(execvp, const char *, char * const *)
DUMMY3(execve, const char *, char * const *, char * const *)