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. 49471f05d53c3df70c47e98d068edb745cf3a816
Date: Thu, 23 Jun 2022 13:21:38 +0000 [thread overview]
Message-ID: <4LTLW71nFzz2y36@people01.haj.ipfire.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 4776 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 49471f05d53c3df70c47e98d068edb745cf3a816 (commit)
from df9ebc6bbe25b2337927cef9351a1a9d60989f92 (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 49471f05d53c3df70c47e98d068edb745cf3a816
Author: Michael Tremer <michael.tremer(a)ipfire.org>
Date: Thu Jun 23 11:43:56 2022 +0000
misc-progs: Fix passing argument list
The run() function expects all arguments without the basename of the
program.
This regression was introduced in a609195a26f2666a177b988a6691bc27b10e6d64.
Fixes: #12886
Signed-off-by: Michael Tremer <michael.tremer(a)ipfire.org>
Acked-by: Peter Müller <peter.mueller(a)ipfire.org>
-----------------------------------------------------------------------
Summary of changes:
src/misc-progs/backupctrl.c | 2 +-
src/misc-progs/extrahdctrl.c | 2 +-
src/misc-progs/getipstat.c | 2 +-
src/misc-progs/mpfirectrl.c | 2 +-
src/misc-progs/pakfire.c | 2 +-
src/misc-progs/sambactrl.c | 4 ++--
6 files changed, 7 insertions(+), 7 deletions(-)
Difference in files:
diff --git a/src/misc-progs/backupctrl.c b/src/misc-progs/backupctrl.c
index 0a85141ca..bb2ca69ef 100644
--- a/src/misc-progs/backupctrl.c
+++ b/src/misc-progs/backupctrl.c
@@ -11,5 +11,5 @@ int main(int argc, char** argv) {
if (!initsetuid())
exit(1);
- return run("/var/ipfire/backup/bin/backup.pl", argv);
+ return run("/var/ipfire/backup/bin/backup.pl", argv + 1);
}
diff --git a/src/misc-progs/extrahdctrl.c b/src/misc-progs/extrahdctrl.c
index 49a25387f..255050acd 100644
--- a/src/misc-progs/extrahdctrl.c
+++ b/src/misc-progs/extrahdctrl.c
@@ -11,5 +11,5 @@ int main(int argc, char** argv) {
if (!initsetuid())
exit(1);
- return run("/var/ipfire/extrahd/bin/extrahd.pl", argv);
+ return run("/var/ipfire/extrahd/bin/extrahd.pl", argv + 1);
}
diff --git a/src/misc-progs/getipstat.c b/src/misc-progs/getipstat.c
index 37e01c81a..66d5b5a92 100644
--- a/src/misc-progs/getipstat.c
+++ b/src/misc-progs/getipstat.c
@@ -27,7 +27,7 @@ int main(int argc, char** argv)
// but /sbin/iptables is actually a symlink to /sbin/xtables-legacy-multi hence that program is executed
// however without the notion that it was called as "iptables". So we have to pass "iptables" as first
// argument.
- char *args[10] = {"iptables", "--list", "--verbose", "--numeric", "--wait", "5", NULL, NULL, NULL, NULL};
+ char *args[] = {"--list", "--verbose", "--numeric", "--wait", "5", NULL, NULL, NULL, NULL};
char *usage = "getipstat [-x][-f|-n|-m]";
unsigned int pcount = 6;
unsigned int table_set = 0;
diff --git a/src/misc-progs/mpfirectrl.c b/src/misc-progs/mpfirectrl.c
index a71789c0f..4ea1fb543 100644
--- a/src/misc-progs/mpfirectrl.c
+++ b/src/misc-progs/mpfirectrl.c
@@ -11,5 +11,5 @@ int main(int argc, char** argv) {
if (!initsetuid())
exit(1);
- return run("/var/ipfire/mpfire/bin/mpfire.pl", argv);
+ return run("/var/ipfire/mpfire/bin/mpfire.pl", argv + 1);
}
diff --git a/src/misc-progs/pakfire.c b/src/misc-progs/pakfire.c
index 93a18e604..35bea8677 100644
--- a/src/misc-progs/pakfire.c
+++ b/src/misc-progs/pakfire.c
@@ -11,5 +11,5 @@ int main(int argc, char** argv) {
if (!initsetuid())
exit(1);
- return run("/opt/pakfire/pakfire", argv);
+ return run("/opt/pakfire/pakfire", argv + 1);
}
diff --git a/src/misc-progs/sambactrl.c b/src/misc-progs/sambactrl.c
index 501535799..38c26089c 100644
--- a/src/misc-progs/sambactrl.c
+++ b/src/misc-progs/sambactrl.c
@@ -82,7 +82,7 @@ int main(int argc, char *argv[]) {
snprintf(command, BUFFER_SIZE-1, "/usr/sbin/useradd -c 'Samba User' -m -g sambauser -s /bin/false %s >/dev/null", argv[2]);
safe_system(command);
- run("/usr/sbin/samba-change-password", argv + 1);
+ run("/usr/sbin/samba-change-password", argv + 2);
} else if (strcmp(argv[1], "smbchangepw") == 0) {
if (!is_valid_argument_alnum(argv[2])) {
@@ -90,7 +90,7 @@ int main(int argc, char *argv[]) {
exit(2);
}
- run("/usr/sbin/samba-change-password", argv + 1);
+ run("/usr/sbin/samba-change-password", argv + 2);
} else if (strcmp(argv[1], "readsmbpasswd") == 0) {
safe_system("/bin/chown root:nobody /var/ipfire/samba/private >/dev/null");
hooks/post-receive
--
IPFire 2.x development tree
reply other threads:[~2022-06-23 13:21 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=4LTLW71nFzz2y36@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