From 693ebbd16bc1560ec3ec166d9944e44583141259 Mon Sep 17 00:00:00 2001 From: Jonathan Conder Date: Thu, 19 Aug 2010 00:07:21 +1200 Subject: use execv to avoid using sh just to run ldconfig Signed-off-by: Jonathan Conder Signed-off-by: Dan McGee --- lib/libalpm/trans.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lib/libalpm/trans.c') diff --git a/lib/libalpm/trans.c b/lib/libalpm/trans.c index 3c5141a1..2e25b787 100644 --- a/lib/libalpm/trans.c +++ b/lib/libalpm/trans.c @@ -344,6 +344,7 @@ int _alpm_runscriptlet(const char *root, const char *installfn, char scriptfn[PATH_MAX]; char cmdline[PATH_MAX]; char tmpdir[PATH_MAX]; + char *argv[] = { "sh", "-c", cmdline, NULL }; char *scriptpath; int clean_tmpdir = 0; int retval = 0; @@ -401,7 +402,9 @@ int _alpm_runscriptlet(const char *root, const char *installfn, scriptpath, script, ver); } - retval = _alpm_run_chroot(root, cmdline); + _alpm_log(PM_LOG_DEBUG, "executing \"%s\"\n", cmdline); + + retval = _alpm_run_chroot(root, "/bin/sh", argv); cleanup: if(clean_tmpdir && _alpm_rmrf(tmpdir)) { -- cgit v1.2.3-24-g4f1b