]> pd.if.org Git - startuptools/blobdiff - chids.c
renamed chids to setid
[startuptools] / chids.c
diff --git a/chids.c b/chids.c
deleted file mode 100644 (file)
index fbe742f..0000000
--- a/chids.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * set id
- */
-
-#include <stdlib.h>
-#include <unistd.h>
-#include <sys/types.h>
-#include <pwd.h>
-
-#include "exec.c"
-#include "die.c"
-
-int main(int ac, char *av[]) {
-       struct passwd *pw;
-
-       pw = getpwnam(av[1]);
-       if (!pw) {
-               errordie("getpwnam");
-               exit(EXIT_FAILURE);
-       }
-       
-       if (seteuid(pw->pw_uid) == -1) {
-               errordie("seteuid");
-               exit(EXIT_FAILURE);
-       };
-
-       do_exec(2, ac, av);
-
-       /* shouldn't get here... */
-       return EXIT_FAILURE;
-}