public inbox for ipfire-scm@lists.ipfire.org
 help / color / mirror / Atom feed
From: Michael Tremer <git@ipfire.org>
To: ipfire-scm@lists.ipfire.org
Subject: [git.ipfire.org] IPFire 2.x development tree branch, master, updated. 0d58fcd2aa1240e96754aaf24665d4d1650e301a
Date: Sun, 07 Feb 2021 16:48:01 +0000	[thread overview]
Message-ID: <4DYZpT210tz2xR9@people01.haj.ipfire.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 1795 bytes --]

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, master has been updated
       via  0d58fcd2aa1240e96754aaf24665d4d1650e301a (commit)
      from  fbbf44c62f509cdcc2e97e624137e6e64ad33dd9 (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 0d58fcd2aa1240e96754aaf24665d4d1650e301a
Author: Michael Tremer <michael.tremer(a)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(a)ipfire.org>
    Signed-off-by: Michael Tremer <michael.tremer(a)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

                 reply	other threads:[~2021-02-07 16:48 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4DYZpT210tz2xR9@people01.haj.ipfire.org \
    --to=git@ipfire.org \
    --cc=ipfire-scm@lists.ipfire.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox