diff options
author | Kay Sievers <kay@vrfy.org> | 2012-06-04 12:52:14 +0200 |
---|---|---|
committer | Kay Sievers <kay@vrfy.org> | 2012-06-04 12:52:14 +0200 |
commit | 2b71016a3c3d4c088e8edd170fe6eb8431fd71fa (patch) | |
tree | e54503756788b80891b5a2a85ddc671e29dd758e | |
parent | ae5b21eaba2e716034b852c00fc68f98392a2eb7 (diff) |
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.
-rw-r--r-- | src/fstab-generator/fstab-generator.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/fstab-generator/fstab-generator.c b/src/fstab-generator/fstab-generator.c index 8419a0c5b4..0746724983 100644 --- a/src/fstab-generator/fstab-generator.c +++ b/src/fstab-generator/fstab-generator.c @@ -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); |