summaryrefslogtreecommitdiff
path: root/bin/autobuild.c
diff options
context:
space:
mode:
Diffstat (limited to 'bin/autobuild.c')
-rw-r--r--bin/autobuild.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/autobuild.c b/bin/autobuild.c
index 4d0580f..07e84e9 100644
--- a/bin/autobuild.c
+++ b/bin/autobuild.c
@@ -53,8 +53,6 @@ main(int argc, char **argv)
struct passwd *user = getpwuid(geteuid());
setreuid(geteuid(), -1);
- printf("ruid:%d\teuid:%d\n", getuid(), geteuid());
-
const char *env_term = getenv("TERM");
const char *env_lang = getenv("LANG");
const char *env_lc_all = getenv("LC_ALL");
@@ -77,10 +75,12 @@ main(int argc, char **argv)
mysetenv("LC_MONETARY", env_lc_monetary);
mysetenv("LC_NUMERIC" , env_lc_numeric );
mysetenv("LC_TIME" , env_lc_time );
+
const char *script_suffix = "/bin/autobuild.sh";
char *script = alloca(strlen(user->pw_dir)+strlen(script_suffix));
strcpy(script, user->pw_dir);
strcpy(&(script[strlen(user->pw_dir)]), script_suffix);
+
execl(script, script, argv[1], NULL);
error(127, errno, "%s", script);
}