]> err.no Git - systemd/commitdiff
fstab-generator: avoid mangling of non-path mount source and dest
authorKay Sievers <kay@vrfy.org>
Mon, 4 Jun 2012 10:52:14 +0000 (12:52 +0200)
committerKay Sievers <kay@vrfy.org>
Mon, 4 Jun 2012 10:52:14 +0000 (12:52 +0200)
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.

src/fstab-generator/fstab-generator.c

index 8419a0c5b45a8e0c1e975847dc120a6d06e4211c..07467249831c6971be722ac769fa10af3332d0d7 100644 (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);