Previously this would fail later on, but let's filter this out at the
time of parsing.
if (!path_is_absolute(destination))
return -EINVAL;
+ if (empty_or_root(destination))
+ return -EINVAL;
m = custom_mount_add(l, n, CUSTOM_MOUNT_BIND);
if (!m)
if (!path_is_absolute(path))
return -EINVAL;
+ if (empty_or_root(path))
+ return -EINVAL;
m = custom_mount_add(l, n, CUSTOM_MOUNT_TMPFS);
if (!m)
return -EINVAL;
}
+ if (empty_or_root(destination))
+ return -EINVAL;
+
m = custom_mount_add(l, n, CUSTOM_MOUNT_OVERLAY);
if (!m)
return -ENOMEM;