I think this is a bug in libmount1. The function mnt_chdir_to_parent() in
util-linux-2.20.1/libmount/src/utils.c fails to handle paths of the form
/dir correctly. The following patch for the source package util-linux should
fix this:
@@ -85,11 +85,14 @@
if (!last)
goto err;
}
- if (!*path)
- *path = '/'; /* root */
- if (chdir(path) == -1) {
- DBG(UTILS, mnt_debug("failed to chdir to %s: %m", path));
+ if (*path)
+ path2 = path;
+ else
+ path2 = "/"; /* root */
+
+ if (chdir(path2) == -1) {
+ DBG(UTILS, mnt_debug("failed to chdir to %s: %m", path2));
rc = -errno;
goto err;
}
@@ -98,12 +101,12 @@
rc = -errno;
goto err;
}
- if (strcmp(cwd, path) != 0) {
- DBG(UTILS, mnt_debug("path moved (%s -> %s)", path, cwd));
+ if (strcmp(cwd, path2) != 0) {
+ DBG(UTILS, mnt_debug("path moved (%s -> %s)", path2, cwd));
goto err;
}
- DBG(CXT, mnt_debug("current directory moved to %s", path));
+ DBG(CXT, mnt_debug("current directory moved to %s", path2));
*filename = path;
--
To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 201210102344.17447.grossmms@googlemail.com">http://lists.debian.org/201210102344.17447.grossmms@googlemail.com