1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-01-20 14:03:39 +03:00

fstab-generator: avoid mangling of non-path mount source and dest

This can invalidate otherwise valid source paths with trailing slashes,
such as "host:/" in the case of a network mount.

Based on a patch from Dave Reisner <dreisner@archlinux.org>, which
removed the slash mangling entirely.

Changed it to match on the leading slash to exclude non-path values.
This commit is contained in:
Kay Sievers 2012-06-04 12:52:14 +02:00
parent ae5b21eaba
commit 2b71016a3c

View File

@ -470,10 +470,10 @@ static int parse_fstab(void) {
goto finish;
}
if (is_path(what))
if (path_is_absolute(what))
path_kill_slashes(what);
if (is_path(where))
if (path_is_absolute(where))
path_kill_slashes(where);
log_debug("Found entry what=%s where=%s type=%s", what, where, me->mnt_type);