From: Kay Sievers Date: Mon, 4 Jun 2012 10:52:14 +0000 (+0200) Subject: fstab-generator: avoid mangling of non-path mount source and dest X-Git-Tag: v185~10 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=2b71016a3c3d4c088e8edd170fe6eb8431fd71fa;p=elogind.git 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 , which removed the slash mangling entirely. Changed it to match on the leading slash to exclude non-path values. --- diff --git a/src/fstab-generator/fstab-generator.c b/src/fstab-generator/fstab-generator.c index 8419a0c5b..074672498 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);