aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2017-08-09 19:24:19 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2017-08-09 19:24:19 +0200
commitc6ce1c9ca3e20ad8441a5aa2f3bda4f57180224e (patch)
tree574561a562d50a152692761f3fbb1c5b90e86498
parent7943be1e13d6c09f2adda5e954d56ff019a79008 (diff)
downloadbusybox-w32-c6ce1c9ca3e20ad8441a5aa2f3bda4f57180224e.tar.gz
busybox-w32-c6ce1c9ca3e20ad8441a5aa2f3bda4f57180224e.tar.bz2
busybox-w32-c6ce1c9ca3e20ad8441a5aa2f3bda4f57180224e.zip
ipcrm,ipcs: make them NOEXEC
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--util-linux/ipcrm.c2
-rw-r--r--util-linux/ipcs.c34
2 files changed, 18 insertions, 18 deletions
diff --git a/util-linux/ipcrm.c b/util-linux/ipcrm.c
index fa1159f03..a93ceee11 100644
--- a/util-linux/ipcrm.c
+++ b/util-linux/ipcrm.c
@@ -15,7 +15,7 @@
15//config: communication (IPC) objects and the associated data structures 15//config: communication (IPC) objects and the associated data structures
16//config: from the system. 16//config: from the system.
17 17
18//applet:IF_IPCRM(APPLET(ipcrm, BB_DIR_USR_BIN, BB_SUID_DROP)) 18//applet:IF_IPCRM(APPLET_NOEXEC(ipcrm, ipcrm, BB_DIR_USR_BIN, BB_SUID_DROP, ipcrm))
19 19
20//kbuild:lib-$(CONFIG_IPCRM) += ipcrm.o 20//kbuild:lib-$(CONFIG_IPCRM) += ipcrm.o
21 21
diff --git a/util-linux/ipcs.c b/util-linux/ipcs.c
index 1404930d4..f0d405d67 100644
--- a/util-linux/ipcs.c
+++ b/util-linux/ipcs.c
@@ -15,26 +15,10 @@
15//config: The ipcs utility is used to provide information on the currently 15//config: The ipcs utility is used to provide information on the currently
16//config: allocated System V interprocess (IPC) objects in the system. 16//config: allocated System V interprocess (IPC) objects in the system.
17 17
18//applet:IF_IPCS(APPLET(ipcs, BB_DIR_USR_BIN, BB_SUID_DROP)) 18//applet:IF_IPCS(APPLET_NOEXEC(ipcs, ipcs, BB_DIR_USR_BIN, BB_SUID_DROP, ipcs))
19 19
20//kbuild:lib-$(CONFIG_IPCS) += ipcs.o 20//kbuild:lib-$(CONFIG_IPCS) += ipcs.o
21 21
22//usage:#define ipcs_trivial_usage
23//usage: "[[-smq] -i shmid] | [[-asmq] [-tcplu]]"
24//usage:#define ipcs_full_usage "\n\n"
25//usage: " -i Show specific resource"
26//usage: "\nResource specification:"
27//usage: "\n -m Shared memory segments"
28//usage: "\n -q Message queues"
29//usage: "\n -s Semaphore arrays"
30//usage: "\n -a All (default)"
31//usage: "\nOutput format:"
32//usage: "\n -t Time"
33//usage: "\n -c Creator"
34//usage: "\n -p Pid"
35//usage: "\n -l Limits"
36//usage: "\n -u Summary"
37
38/* X/OPEN tells us to use <sys/{types,ipc,sem}.h> for semctl() */ 22/* X/OPEN tells us to use <sys/{types,ipc,sem}.h> for semctl() */
39/* X/OPEN tells us to use <sys/{types,ipc,msg}.h> for msgctl() */ 23/* X/OPEN tells us to use <sys/{types,ipc,msg}.h> for msgctl() */
40/* X/OPEN tells us to use <sys/{types,ipc,shm}.h> for shmctl() */ 24/* X/OPEN tells us to use <sys/{types,ipc,shm}.h> for shmctl() */
@@ -585,6 +569,22 @@ static void print_sem(int semid)
585 bb_putchar('\n'); 569 bb_putchar('\n');
586} 570}
587 571
572//usage:#define ipcs_trivial_usage
573//usage: "[[-smq] -i shmid] | [[-asmq] [-tcplu]]"
574//usage:#define ipcs_full_usage "\n\n"
575//usage: " -i Show specific resource"
576//usage: "\nResource specification:"
577//usage: "\n -m Shared memory segments"
578//usage: "\n -q Message queues"
579//usage: "\n -s Semaphore arrays"
580//usage: "\n -a All (default)"
581//usage: "\nOutput format:"
582//usage: "\n -t Time"
583//usage: "\n -c Creator"
584//usage: "\n -p Pid"
585//usage: "\n -l Limits"
586//usage: "\n -u Summary"
587
588int ipcs_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; 588int ipcs_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
589int ipcs_main(int argc UNUSED_PARAM, char **argv) 589int ipcs_main(int argc UNUSED_PARAM, char **argv)
590{ 590{