aboutsummaryrefslogtreecommitdiff
path: root/flags/rsa-runner.c
diff options
context:
space:
mode:
Diffstat (limited to 'flags/rsa-runner.c')
-rw-r--r--flags/rsa-runner.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/flags/rsa-runner.c b/flags/rsa-runner.c
new file mode 100644
index 0000000..2b8c9d2
--- /dev/null
+++ b/flags/rsa-runner.c
@@ -0,0 +1,24 @@
+#include <sys/types.h>
+#include <sys/wait.h>
+#include <stdio.h>
+#include <fcntl.h>
+#include <unistd.h>
+
+int main(int argc, char **argv) {
+ pid_t pid;
+ int status;
+
+ fprintf(stderr, "real %d:%d effective %d:%d\n",
+ getuid(), getgid(), geteuid(), getegid());
+
+ pid = fork();
+ if(pid < 0) {
+ perror("fork failed");
+ }
+ if(0 == pid) {
+ execlp("/flags/rsa.py", "rsa.py", NULL);
+ perror("exec failed");
+ }
+ waitpid(pid, &status, 0);
+ return 0;
+}