summaryrefslogtreecommitdiffstats
path: root/sys-utils
diff options
context:
space:
mode:
authorKarel Zak2019-06-06 14:52:40 +0200
committerKarel Zak2019-06-06 14:56:48 +0200
commitbf0a0e3e2aad599919536a9e3244686fd4292e10 (patch)
treea2c516d12d77e367cbbea4d845b64b30bba3b5c2 /sys-utils
parentwall: make sure ut_line is not empty (diff)
downloadkernel-qcow2-util-linux-bf0a0e3e2aad599919536a9e3244686fd4292e10.tar.gz
kernel-qcow2-util-linux-bf0a0e3e2aad599919536a9e3244686fd4292e10.tar.xz
kernel-qcow2-util-linux-bf0a0e3e2aad599919536a9e3244686fd4292e10.zip
umount: be more strict about --all
If you by accident execute umount ls -al /mnt/ then umount --all is executed and another arguments silently ignored. It seems better to be more strict in this case. Reported-by: Harald Dunkel <harald.dunkel@aixigo.com> Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'sys-utils')
-rw-r--r--sys-utils/umount.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys-utils/umount.c b/sys-utils/umount.c
index e3734b0ec..397e0ebfc 100644
--- a/sys-utils/umount.c
+++ b/sys-utils/umount.c
@@ -573,6 +573,10 @@ int main(int argc, char **argv)
argv += optind;
if (all) {
+ if (argc) {
+ warnx(_("unexpected number of arguments"));
+ errtryhelp(MNT_EX_USAGE);
+ }
if (!types)
types = "noproc,nodevfs,nodevpts,nosysfs,norpc_pipefs,nonfsd,noselinuxfs";