diff options
-rw-r--r-- | NOFORK_NOEXEC.lst | 2 | ||||
-rw-r--r-- | util-linux/umount.c | 13 |
2 files changed, 13 insertions, 2 deletions
diff --git a/NOFORK_NOEXEC.lst b/NOFORK_NOEXEC.lst index fbba3adb3..8b35df289 100644 --- a/NOFORK_NOEXEC.lst +++ b/NOFORK_NOEXEC.lst | |||
@@ -378,7 +378,7 @@ udhcpc - daemon | |||
378 | udhcpd - daemon | 378 | udhcpd - daemon |
379 | udpsvd - daemon | 379 | udpsvd - daemon |
380 | uevent - daemon | 380 | uevent - daemon |
381 | umount - noexec candidate, leaks: nested xmalloc | 381 | umount - noexec. leaks: nested xmalloc |
382 | uname - NOFORK | 382 | uname - NOFORK |
383 | uncompress - runner | 383 | uncompress - runner |
384 | unexpand - runner | 384 | unexpand - runner |
diff --git a/util-linux/umount.c b/util-linux/umount.c index 122c0f579..33667b13c 100644 --- a/util-linux/umount.c +++ b/util-linux/umount.c | |||
@@ -24,7 +24,18 @@ | |||
24 | //config: help | 24 | //config: help |
25 | //config: Support -a option to unmount all currently mounted filesystems. | 25 | //config: Support -a option to unmount all currently mounted filesystems. |
26 | 26 | ||
27 | //applet:IF_UMOUNT(APPLET(umount, BB_DIR_BIN, BB_SUID_DROP)) | 27 | //applet:IF_UMOUNT(APPLET_NOEXEC(umount, umount, BB_DIR_BIN, BB_SUID_DROP, umount)) |
28 | /* | ||
29 | * On one hand, in some weird situations you'd want umount | ||
30 | * to not do anything surprising, to behave as a usual fork+execed executable. | ||
31 | * | ||
32 | * OTOH, there can be situations where execing would not succeed, or even hang | ||
33 | * (say, if executable is on a filesystem which is in trouble and accesses to it | ||
34 | * block in kernel). | ||
35 | * In this case, you might be actually happy if your standalone bbox shell | ||
36 | * does not fork+exec, but only forks and calls umount_main() which it already has! | ||
37 | * Let's go with NOEXEC. | ||
38 | */ | ||
28 | 39 | ||
29 | //kbuild:lib-$(CONFIG_UMOUNT) += umount.o | 40 | //kbuild:lib-$(CONFIG_UMOUNT) += umount.o |
30 | 41 | ||