]> granicus.if.org Git - sudo/commitdiff
Also interpose system(3). On glibc systems you cannot interpose
authorTodd C. Miller <Todd.Miller@courtesan.com>
Mon, 28 Sep 2015 21:10:00 +0000 (15:10 -0600)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Mon, 28 Sep 2015 21:10:00 +0000 (15:10 -0600)
the syscalls used internally by libc.

src/sudo_noexec.c

index 615f98b690cb9cb240350dc8b293e91c1f09cb13..d36671f2924362f1573a23e18cceb3e55699f17b 100644 (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 *)