[git commit] ps: make it NOEXEC

Denys Vlasenko vda.linux at googlemail.com
Thu Aug 10 12:15:52 UTC 2017


commit: https://git.busybox.net/busybox/commit/?id=9a6f62fd5172c14adf765285d6c000691d89d58d
branch: https://git.busybox.net/busybox/commit/?id=refs/heads/master

Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
 NOFORK_NOEXEC.lst | 4 ++--
 procps/ps.c       | 3 +--
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/NOFORK_NOEXEC.lst b/NOFORK_NOEXEC.lst
index fd5b358..3070a32 100644
--- a/NOFORK_NOEXEC.lst
+++ b/NOFORK_NOEXEC.lst
@@ -283,8 +283,8 @@ poweroff - rare
 powertop - interactive, longterm
 printenv - NOFORK
 printf - NOFORK
-ps - looks for AT_CLKTCK elf aux vector, therefore can't be noexec
-pscan - longterm
+ps - noexec
+pscan - talks to network
 pstree - noexec
 pwd - NOFORK
 pwdx - NOFORK
diff --git a/procps/ps.c b/procps/ps.c
index fab8c81..2a53cc9 100644
--- a/procps/ps.c
+++ b/procps/ps.c
@@ -50,8 +50,7 @@
 //config:	Include support for measuring HZ on old kernels and non-ELF systems
 //config:	(if you are on Linux 2.4.0+ and use ELF, you don't need this)
 
-//applet:IF_PS(APPLET(ps, BB_DIR_BIN, BB_SUID_DROP))
-/* can't be NOEXEC: uses ELF aux vector. To have it, we must be a normal, execed process */
+//applet:IF_PS(APPLET_NOEXEC(ps, ps, BB_DIR_BIN, BB_SUID_DROP, ps))
 
 //kbuild:lib-$(CONFIG_PS) += ps.o
 


More information about the busybox-cvs mailing list