From 1e846357687b46ff02e159af8b7da974cd647303 Mon Sep 17 00:00:00 2001 From: Parabola automatic package builder Date: Mon, 23 Jun 2014 17:14:52 +0000 Subject: clean up autobuild.c --- bin/autobuild.c | 4 ++-- 1 file 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); } -- cgit v1.2.3-54-g00ecf