diff options
author | Parabola automatic package builder <dev@lists.parabolagnulinux.org> | 2014-06-23 17:14:52 +0000 |
---|---|---|
committer | Parabola automatic package builder <dev@lists.parabolagnulinux.org> | 2014-06-23 17:14:52 +0000 |
commit | 1e846357687b46ff02e159af8b7da974cd647303 (patch) | |
tree | 488c6f973cc5dcee9564efce0d1c876dec6cbc8a | |
parent | fcfc636c873c9ea9d8e9dc5971122d3509b269f6 (diff) |
clean up autobuild.c
-rw-r--r-- | bin/autobuild.c | 4 |
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); } |