Permalink
Browse files

Added safe suid wrapper

  • Loading branch information...
1 parent bf42563 commit ecfc0832c2bd9b943d60152e8b73711ad35e8dde @ThomasHabets committed Nov 25, 2011
Showing with 17 additions and 0 deletions.
  1. +17 −0 suidwrap.c
View
@@ -0,0 +1,17 @@
+#include<stdio.h>
+#include<unistd.h>
+#include<errno.h>
+#include<string.h>
+
+static const char *program = "/usr/local/bin/multitraceroute";
+
+int
+main(int argc, char **argv)
+{
+ char *envp[] = {
+ NULL
+ };
+ execve(program, argv, envp);
+ fprintf(stderr, "execve() failed: %s\n", strerror(errno));
+ return 1;
+}

0 comments on commit ecfc083

Please sign in to comment.