systemd-mount: don't check for non-normalized WHAT for network FS

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
This commit is contained in:
Karel Zak 2019-06-10 15:18:47 +02:00 committed by Zbigniew Jędrzejewski-Szmek
parent 9a31142997
commit 08185cff19

View 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;
}