diff options
-rw-r--r-- | config.h | 2 | ||||
-rw-r--r-- | dummyshell.c | 3 | ||||
-rw-r--r-- | suidcmd.c | 5 |
3 files changed, 4 insertions, 6 deletions
@@ -35,4 +35,4 @@ ***********/ /* suid commands (e.g.: "first-cmd", "second-cmd", "nth-cmd") */ -#define SUIDCMD_CMDS "/usr/sbin/ether-wake" +#define SUIDCMD_CMDS "/usr/sbin/ether-wake", "/bin/ping" diff --git a/dummyshell.c b/dummyshell.c index 07cc9dd..45c49a0 100644 --- a/dummyshell.c +++ b/dummyshell.c @@ -116,7 +116,8 @@ struct __attribute__((__packed__)) cmd { }; static struct cmd cmds[] = { - { "ether-wake", "/var/media/ftp/bin/suid-ether-wake", "-b -i lan", NEED_ARGS }, + { "ether-wake", "/usr/bin/suid-ether-wake", "-b -i lan", NEED_ARGS }, + { "ping", "/usr/bin/suid-ping", NULL, NEED_ARGS }, { "netstat-client", "/bin/netstat", "-pntu", NO_ARGS }, { "netstat-server", "/bin/netstat", "-lpn", NO_ARGS }, { "echo", "/bin/echo", NULL, NEED_ARGS }, @@ -1,5 +1,5 @@ /* - * build with: gcc -std=c99 -D_GNU_SOURCE=1 -Wall -O2 -ffunction-sections -fdata-sections -fomit-frame-pointer ./suidcmd.c -o ./suidcmd + * build with: gcc -std=c99 -D_HAVE_CONFIG=1 -D_GNU_SOURCE=1 -Wall -O2 -ffunction-sections -fdata-sections -fomit-frame-pointer ./suidcmd.c -o ./suidcmd * strip -s ./suidcmd */ @@ -14,9 +14,6 @@ #include <libgen.h> /* basename(...) */ -#ifndef SUIDCMD_CMDS -#define SUIDCMD_CMDS "/usr/sbin/ether-wake" -#endif static const char* const cmds[] = { SUIDCMD_CMDS }; static const size_t cmdsiz = sizeof(cmds)/sizeof(cmds[0]); |