ipcrm,ipcs: make them NOEXEC
authorDenys Vlasenko <vda.linux@googlemail.com>
Wed, 9 Aug 2017 17:24:19 +0000 (19:24 +0200)
committerDenys Vlasenko <vda.linux@googlemail.com>
Wed, 9 Aug 2017 17:24:19 +0000 (19:24 +0200)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
util-linux/ipcrm.c
util-linux/ipcs.c

index fa1159f0368a6de541037f78e0e6183b095f7df1..a93ceee11879a688a5a3f21aa6bc92efe54d8ef9 100644 (file)
@@ -15,7 +15,7 @@
 //config:      communication (IPC) objects and the associated data structures
 //config:      from the system.
 
-//applet:IF_IPCRM(APPLET(ipcrm, BB_DIR_USR_BIN, BB_SUID_DROP))
+//applet:IF_IPCRM(APPLET_NOEXEC(ipcrm, ipcrm, BB_DIR_USR_BIN, BB_SUID_DROP, ipcrm))
 
 //kbuild:lib-$(CONFIG_IPCRM) += ipcrm.o
 
index 1404930d4a8c46421eb51117bb6c09f3d4750fde..f0d405d679e1c2b5ee0a0f282206326ddc7a667d 100644 (file)
 //config:      The ipcs utility is used to provide information on the currently
 //config:      allocated System V interprocess (IPC) objects in the system.
 
-//applet:IF_IPCS(APPLET(ipcs, BB_DIR_USR_BIN, BB_SUID_DROP))
+//applet:IF_IPCS(APPLET_NOEXEC(ipcs, ipcs, BB_DIR_USR_BIN, BB_SUID_DROP, ipcs))
 
 //kbuild:lib-$(CONFIG_IPCS) += ipcs.o
 
-//usage:#define ipcs_trivial_usage
-//usage:       "[[-smq] -i shmid] | [[-asmq] [-tcplu]]"
-//usage:#define ipcs_full_usage "\n\n"
-//usage:       "       -i      Show specific resource"
-//usage:     "\nResource specification:"
-//usage:     "\n       -m      Shared memory segments"
-//usage:     "\n       -q      Message queues"
-//usage:     "\n       -s      Semaphore arrays"
-//usage:     "\n       -a      All (default)"
-//usage:     "\nOutput format:"
-//usage:     "\n       -t      Time"
-//usage:     "\n       -c      Creator"
-//usage:     "\n       -p      Pid"
-//usage:     "\n       -l      Limits"
-//usage:     "\n       -u      Summary"
-
 /* X/OPEN tells us to use <sys/{types,ipc,sem}.h> for semctl() */
 /* X/OPEN tells us to use <sys/{types,ipc,msg}.h> for msgctl() */
 /* X/OPEN tells us to use <sys/{types,ipc,shm}.h> for shmctl() */
@@ -585,6 +569,22 @@ static void print_sem(int semid)
        bb_putchar('\n');
 }
 
+//usage:#define ipcs_trivial_usage
+//usage:       "[[-smq] -i shmid] | [[-asmq] [-tcplu]]"
+//usage:#define ipcs_full_usage "\n\n"
+//usage:       "       -i      Show specific resource"
+//usage:     "\nResource specification:"
+//usage:     "\n       -m      Shared memory segments"
+//usage:     "\n       -q      Message queues"
+//usage:     "\n       -s      Semaphore arrays"
+//usage:     "\n       -a      All (default)"
+//usage:     "\nOutput format:"
+//usage:     "\n       -t      Time"
+//usage:     "\n       -c      Creator"
+//usage:     "\n       -p      Pid"
+//usage:     "\n       -l      Limits"
+//usage:     "\n       -u      Summary"
+
 int ipcs_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
 int ipcs_main(int argc UNUSED_PARAM, char **argv)
 {