public inbox for ipfire-scm@lists.ipfire.org
 help / color / mirror / Atom feed
* [git.ipfire.org] IPFire 2.x development tree branch, next, updated. 6b0e6c1b84cbe0cad9b94e779ab28089da909e23
@ 2022-06-17 11:01 Peter Müller
  0 siblings, 0 replies; only message in thread
From: Peter Müller @ 2022-06-17 11:01 UTC (permalink / raw)
  To: ipfire-scm

[-- 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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-06-17 11:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-17 11:01 [git.ipfire.org] IPFire 2.x development tree branch, next, updated. 6b0e6c1b84cbe0cad9b94e779ab28089da909e23 Peter Müller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox