diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2017-08-07 18:18:09 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2017-08-07 18:18:09 +0200 |
commit | 248a67fb75a0d2c98f4f9935b7bb9e11382b2c78 (patch) | |
tree | eea88807a0b5d936d158ef7a62dfb051df174e96 /procps/free.c | |
parent | 316d38e25883c68e51533029dbab059ae0731de8 (diff) | |
download | busybox-w32-248a67fb75a0d2c98f4f9935b7bb9e11382b2c78.tar.gz busybox-w32-248a67fb75a0d2c98f4f9935b7bb9e11382b2c78.tar.bz2 busybox-w32-248a67fb75a0d2c98f4f9935b7bb9e11382b2c78.zip |
free,stat: make NOEXEC
pkill/pgrep/pidof uncovered another quirk: what about noexec's _process names_?
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'procps/free.c')
-rw-r--r-- | procps/free.c | 7 |
1 files changed, 5 insertions, 2 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 | ||
53 | static unsigned long long scale(unsigned long d) | 56 | static unsigned long long scale(unsigned long d) |