summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko2018-01-14 14:44:30 +0100
committerDenys Vlasenko2018-01-14 14:44:30 +0100
commit6f1c942a31fc517e0be53ccc55d5162b2c7806aa (patch)
tree5767fd2628643fd5943e6632c7690e6460bcd369
parent88663e481f3284225ea0ceaf97f3904adedb21a2 (diff)
downloadbusybox-6f1c942a31fc517e0be53ccc55d5162b2c7806aa.zip
busybox-6f1c942a31fc517e0be53ccc55d5162b2c7806aa.tar.gz
NOFORK_NOEXEC.sh: a script to find "interesting" applets
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rwxr-xr-xNOFORK_NOEXEC.sh34
1 files changed, 34 insertions, 0 deletions
diff --git a/NOFORK_NOEXEC.sh b/NOFORK_NOEXEC.sh
new file mode 100755
index 0000000..f4eeeef
--- /dev/null
+++ b/NOFORK_NOEXEC.sh
@@ -0,0 +1,34 @@
+#!/bin/sh
+
+exec >NOFORK_NOEXEC.lst1
+
+false && grep -Fv 'NOFORK' NOFORK_NOEXEC.lst \
+| grep -v 'noexec.' | grep -v 'noexec$' \
+| grep -v ' suid' \
+| grep -v ' daemon' \
+| grep -v ' longterm' \
+| grep rare
+
+echo === nofork candidate
+grep -F 'nofork candidate' NOFORK_NOEXEC.lst \
+
+echo === noexec candidate
+grep -F 'noexec candidate' NOFORK_NOEXEC.lst \
+
+echo === ^C
+grep -F '^C' NOFORK_NOEXEC.lst \
+| grep -F ' - ' \
+
+echo === talks
+grep -F 'talks' NOFORK_NOEXEC.lst \
+| grep -F ' - ' \
+
+echo ===
+grep -Fv 'NOFORK' NOFORK_NOEXEC.lst \
+| grep '^[^ ][^ ]* - ' \
+| grep -v 'noexec.' | grep -v ' - noexec$' \
+| grep -v ' suid' \
+| grep -v ' daemon' \
+| grep -v 'longterm' \
+| grep -v 'interactive' \
+| grep -v 'hardware' \