]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
systemd-mount: don't check for non-normalized WHAT for network FS
authorKarel Zak <kzak@redhat.com>
Mon, 10 Jun 2019 13:18:47 +0000 (15:18 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 11 Jun 2019 07:19:16 +0000 (09:19 +0200)
The WHAT string could be whatever for many filesystems. The common
example are network filesystems.

Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1708996

src/mount/mount-tool.c

index 43e216acad09f3a65546333f51a337ac000a6317..4e9ab762e9362cd1c6e3f0db35bbf4518519801b 100644 (file)
@@ -1533,7 +1533,8 @@ static int run(int argc, char* argv[]) {
         if (arg_action == ACTION_UMOUNT)
                 return action_umount(bus, argc, argv);
 
-        if (!path_is_normalized(arg_mount_what)) {
+        if ((!arg_mount_type || !fstype_is_network(arg_mount_type))
+            && !path_is_normalized(arg_mount_what)) {
                 log_error("Path contains non-normalized components: %s", arg_mount_what);
                 return -EINVAL;
         }