aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config.h2
-rw-r--r--dummyshell.c3
-rw-r--r--suidcmd.c5
3 files changed, 4 insertions, 6 deletions
diff --git a/config.h b/config.h
index ed2cfea..c29d97a 100644
--- a/config.h
+++ b/config.h
@@ -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 },
diff --git a/suidcmd.c b/suidcmd.c
index 397cc12..a3bbe3a 100644
--- a/suidcmd.c
+++ b/suidcmd.c
@@ -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]);