aboutsummaryrefslogtreecommitdiff
path: root/procps
diff options
context:
space:
mode:
Diffstat (limited to 'procps')
-rw-r--r--procps/free.c7
-rw-r--r--procps/pgrep.c6
-rw-r--r--procps/pidof.c4
3 files changed, 14 insertions, 3 deletions
diff --git a/procps/free.c b/procps/free.c
index 618664e08..b57e4a322 100644
--- a/procps/free.c
+++ b/procps/free.c
@@ -15,7 +15,7 @@
15//config: memory in the system, as well as the buffers used by the kernel. 15//config: memory in the system, as well as the buffers used by the kernel.
16//config: The shared memory column should be ignored; it is obsolete. 16//config: The shared memory column should be ignored; it is obsolete.
17 17
18//applet:IF_FREE(APPLET(free, BB_DIR_USR_BIN, BB_SUID_DROP)) 18//applet:IF_FREE(APPLET_NOEXEC(free, free, BB_DIR_USR_BIN, BB_SUID_DROP, free))
19 19
20//kbuild:lib-$(CONFIG_FREE) += free.o 20//kbuild:lib-$(CONFIG_FREE) += free.o
21 21
@@ -47,7 +47,10 @@ struct globals {
47#endif 47#endif
48} FIX_ALIASING; 48} FIX_ALIASING;
49#define G (*(struct globals*)bb_common_bufsiz1) 49#define G (*(struct globals*)bb_common_bufsiz1)
50#define INIT_G() do { setup_common_bufsiz(); } while (0) 50#define INIT_G() do { \
51 setup_common_bufsiz(); \
52 /* NB: noexec applet - globals not zeroed */ \
53} while (0)
51 54
52 55
53static unsigned long long scale(unsigned long d) 56static unsigned long long scale(unsigned long d)
diff --git a/procps/pgrep.c b/procps/pgrep.c
index a3ca9e295..a16a6e959 100644
--- a/procps/pgrep.c
+++ b/procps/pgrep.c
@@ -18,9 +18,13 @@
18//config: help 18//config: help
19//config: Send signals to processes by name. 19//config: Send signals to processes by name.
20 20
21//applet:IF_PGREP(APPLET(pgrep, BB_DIR_USR_BIN, BB_SUID_DROP)) 21//applet:IF_PGREP(APPLET_ODDNAME(pgrep, pgrep, BB_DIR_USR_BIN, BB_SUID_DROP, pgrep))
22// APPLET_ODDNAME:name main location suid_type help 22// APPLET_ODDNAME:name main location suid_type help
23//applet:IF_PKILL(APPLET_ODDNAME(pkill, pgrep, BB_DIR_USR_BIN, BB_SUID_DROP, pkill)) 23//applet:IF_PKILL(APPLET_ODDNAME(pkill, pgrep, BB_DIR_USR_BIN, BB_SUID_DROP, pkill))
24/* can't be noexec: can find _itself_ under wrong name, since after fork only,
25 * /proc/PID/cmdline and comm are wrong! Can fix comm (prctl(PR_SET_NAME)),
26 * but cmdline?
27 */
24 28
25//kbuild:lib-$(CONFIG_PGREP) += pgrep.o 29//kbuild:lib-$(CONFIG_PGREP) += pgrep.o
26//kbuild:lib-$(CONFIG_PKILL) += pgrep.o 30//kbuild:lib-$(CONFIG_PKILL) += pgrep.o
diff --git a/procps/pidof.c b/procps/pidof.c
index 41247a02c..98d7949f8 100644
--- a/procps/pidof.c
+++ b/procps/pidof.c
@@ -30,6 +30,10 @@
30//config: of the pidof, in other words the calling shell or shell script. 30//config: of the pidof, in other words the calling shell or shell script.
31 31
32//applet:IF_PIDOF(APPLET(pidof, BB_DIR_BIN, BB_SUID_DROP)) 32//applet:IF_PIDOF(APPLET(pidof, BB_DIR_BIN, BB_SUID_DROP))
33/* can't be noexec: can find _itself_ under wrong name, since after fork only,
34 * /proc/PID/cmdline and comm are wrong! Can fix comm (prctl(PR_SET_NAME)),
35 * but cmdline?
36 */
33 37
34//kbuild:lib-$(CONFIG_PIDOF) += pidof.o 38//kbuild:lib-$(CONFIG_PIDOF) += pidof.o
35 39