summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorJay Freeman <saurik@saurik.com>2008-03-06 15:53:49 +0000
committerJay Freeman <saurik@saurik.com>2008-03-06 15:53:49 +0000
commit659074a945f430c7c63c6314dde2882668b48907 (patch)
treebf5e0f120fd931cb834b0e8afa7ba419eacc2c6d /util
parent7def74ccf0d9bacc8be063da4966477f6602589f (diff)
Moving in new toolchain patches.
git-svn-id: http://svn.telesphoreo.org/trunk@157 514c082c-b64e-11dc-b46d-3d985efe055d
Diffstat (limited to 'util')
-rw-r--r--util/godmode.c8
-rw-r--r--util/symlink.c9
2 files changed, 17 insertions, 0 deletions
diff --git a/util/godmode.c b/util/godmode.c
new file mode 100644
index 000000000..363309f95
--- /dev/null
+++ b/util/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/util/symlink.c b/util/symlink.c
new file mode 100644
index 000000000..853441f80
--- /dev/null
+++ b/util/symlink.c
@@ -0,0 +1,9 @@
+#include <unistd.h>
+
+int main(int argc, const char *argv[]) {
+ setuid(0);
+ setgid(0);
+ unlink(argv[2]);
+ symlink(argv[1], argv[2]);
+ return 0;
+}