if (!initsetuid())
exit(1);
- return run("/var/ipfire/backup/bin/backup.pl", argv);
+ return run("/var/ipfire/backup/bin/backup.pl", argv + 1);
}
if (!initsetuid())
exit(1);
- return run("/var/ipfire/extrahd/bin/extrahd.pl", argv);
+ return run("/var/ipfire/extrahd/bin/extrahd.pl", argv + 1);
}
// 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;
if (!initsetuid())
exit(1);
- return run("/var/ipfire/mpfire/bin/mpfire.pl", argv);
+ return run("/var/ipfire/mpfire/bin/mpfire.pl", argv + 1);
}
if (!initsetuid())
exit(1);
- return run("/opt/pakfire/pakfire", argv);
+ return run("/opt/pakfire/pakfire", argv + 1);
}
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])) {
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");