This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "IPFire 2.x development tree".
The branch, next has been updated via 23f280b5e6d12bfde411a227656985b021de5883 (commit) from 8234ae26425e4f968740434aaa4b9896eb8812c9 (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- commit 23f280b5e6d12bfde411a227656985b021de5883 Author: Michael Tremer michael.tremer@ipfire.org Date: Sun Feb 7 16:46:55 2021 +0000
misc-progs: Call unpriv_system commands in a shell
Reported-by: Arne Fitzenreiter arne_f@ipfire.org Signed-off-by: Michael Tremer michael.tremer@ipfire.org
-----------------------------------------------------------------------
Summary of changes: src/misc-progs/setuid.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
Difference in files: diff --git a/src/misc-progs/setuid.c b/src/misc-progs/setuid.c index efd181ad8..8044742f2 100644 --- a/src/misc-progs/setuid.c +++ b/src/misc-progs/setuid.c @@ -144,7 +144,14 @@ int safe_system(char* command) { /* Much like safe_system but lets you specify a non-root uid and gid to run * the command as */ int unpriv_system(char* command, uid_t uid, gid_t gid) { - return system_core(command, NULL, uid, gid, "unpriv_system"); + char* argv[4] = { + "/bin/sh", + "-c", + command, + NULL, + }; + + return system_core(argv[0], argv, uid, gid, "unpriv_system"); }
/* General routine to initialise a setuid root program, and put the
hooks/post-receive -- IPFire 2.x development tree