public inbox for ipfire-scm@lists.ipfire.org
 help / color / mirror / Atom feed
From: "Peter Müller" <git@ipfire.org>
To: ipfire-scm@lists.ipfire.org
Subject: [git.ipfire.org] IPFire 2.x development tree branch, next, updated. 6b0e6c1b84cbe0cad9b94e779ab28089da909e23
Date: Fri, 17 Jun 2022 11:01:23 +0000	[thread overview]
Message-ID: <4LPbh36LgWz2xv4@people01.haj.ipfire.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 3071 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, next has been updated
       via  6b0e6c1b84cbe0cad9b94e779ab28089da909e23 (commit)
       via  9dc534ddc16203c9033aa99fa8bac46400ee75c3 (commit)
      from  377ffa081183d1f7eadffd434df4bef64116f811 (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 6b0e6c1b84cbe0cad9b94e779ab28089da909e23
Author: Peter Müller <peter.mueller(a)ipfire.org>
Date:   Fri Jun 17 11:01:06 2022 +0000

    Core Update 169: Ship misc-progs
    
    Signed-off-by: Peter Müller <peter.mueller(a)ipfire.org>

commit 9dc534ddc16203c9033aa99fa8bac46400ee75c3
Author: Michael Tremer <michael.tremer(a)ipfire.org>
Date:   Wed Jun 15 09:53:20 2022 +0000

    misc-progs: Add path to executable to argv
    
    Otherwise, the first argument would always be swollowed :(
    
    Signed-off-by: Michael Tremer <michael.tremer(a)ipfire.org>
    Acked-by: Peter Müller <peter.mueller(a)ipfire.org>

-----------------------------------------------------------------------

Summary of changes:
 config/rootfiles/{oldcore/106 => core/169}/filelists/misc-progs | 0
 src/misc-progs/setuid.c                                         | 6 ++----
 2 files changed, 2 insertions(+), 4 deletions(-)
 copy config/rootfiles/{oldcore/106 => core/169}/filelists/misc-progs (100%)

Difference in files:
diff --git a/config/rootfiles/core/169/filelists/misc-progs b/config/rootfiles/core/169/filelists/misc-progs
new file mode 120000
index 000000000..7223caddd
--- /dev/null
+++ b/config/rootfiles/core/169/filelists/misc-progs
@@ -0,0 +1 @@
+../../../common/misc-progs
\ No newline at end of file
diff --git a/src/misc-progs/setuid.c b/src/misc-progs/setuid.c
index 831fb1f90..17b0e7066 100644
--- a/src/misc-progs/setuid.c
+++ b/src/misc-progs/setuid.c
@@ -61,10 +61,8 @@ static int system_core(char* command, char** args, uid_t uid, gid_t gid, char *e
 	if(!command)
 		return 1;
 
-#if 0
 	// Add command as first element to argv
 	argv[argc++] = command;
-#endif
 
 	// Add all other arguments
 	if (args) {
@@ -138,7 +136,7 @@ int safe_system(char* command) {
 		NULL,
 	};
 
-	return system_core(argv[0], argv, 0, 0, "safe_system");
+	return system_core(argv[0], argv + 1, 0, 0, "safe_system");
 }
 
 /* Much like safe_system but lets you specify a non-root uid and gid to run
@@ -151,7 +149,7 @@ int unpriv_system(char* command, uid_t uid, gid_t gid) {
 		NULL,
 	};
 
-	return system_core(argv[0], argv, uid, gid, "unpriv_system");
+	return system_core(argv[0], argv + 1, 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:[~2022-06-17 11:01 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=4LPbh36LgWz2xv4@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