summaryrefslogtreecommitdiff
path: root/tool
diff options
context:
space:
mode:
authorJay Freeman <saurik@saurik.com>2008-02-14 14:32:59 +0000
committerJay Freeman <saurik@saurik.com>2008-02-14 14:32:59 +0000
commit6b964b69935fcc52a1c0a95695ca436e00b6690f (patch)
treea863dd50c7cc7fe19b9759360ed4d5b545f9ba0f /tool
parent459c9779557e19437de4a02f6311c322989228b3 (diff)
Drastically reworked bootstrap package.
git-svn-id: http://svn.telesphoreo.org/trunk@88 514c082c-b64e-11dc-b46d-3d985efe055d
Diffstat (limited to 'tool')
-rw-r--r--tool/godmode.c8
-rw-r--r--tool/symlink.c7
2 files changed, 15 insertions, 0 deletions
diff --git a/tool/godmode.c b/tool/godmode.c
new file mode 100644
index 000000000..363309f95
--- /dev/null
+++ b/tool/godmode.c
@@ -0,0 +1,8 @@
+#include <sys/types.h>
+#include <unistd.h>
+
+int main(int argc, char *argv[]) {
+ setuid(0);
+ setgid(0);
+ execvp(argv[1], argv + 1);
+}
diff --git a/tool/symlink.c b/tool/symlink.c
new file mode 100644
index 000000000..7ba730d8d
--- /dev/null
+++ b/tool/symlink.c
@@ -0,0 +1,7 @@
+#include <unistd.h>
+
+int main(int argc, const char *argv[]) {
+ unlink(argv[2]);
+ symlink(argv[1], argv[2]);
+ return 0;
+}