From d6ea7f6451dbbc03911fb2fbab8045b316f238a2 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 14 Jun 2011 11:43:44 +0200 Subject: [PATCH] 2.19.1-1.2: fix #709681 Signed-off-by: Karel Zak --- util-linux-2.19-mount-fsname.patch | 33 ++++++++++++++++++++++++++++++ util-linux.spec | 9 ++++++-- 2 files changed, 40 insertions(+), 2 deletions(-) create mode 100644 util-linux-2.19-mount-fsname.patch diff --git a/util-linux-2.19-mount-fsname.patch b/util-linux-2.19-mount-fsname.patch new file mode 100644 index 0000000..686d7fb --- /dev/null +++ b/util-linux-2.19-mount-fsname.patch @@ -0,0 +1,33 @@ +From aab72640daa7ee2db3d42fc8278ab86e3aef2d71 Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Thu, 2 Jun 2011 14:53:42 +0200 +Subject: [PATCH] mount: canonicalize fstab mnt_dir + +Addresses: http://bugzilla.redhat.com/show_bug.cgi?id=709681 +Signed-off-by: Karel Zak +--- + mount/fstab.c | 8 +++++++- + 1 files changed, 7 insertions(+), 1 deletions(-) + +diff --git a/mount/fstab.c b/mount/fstab.c +index 8ce733b..4fa26b4 100644 +--- a/mount/fstab.c ++++ b/mount/fstab.c +@@ -455,7 +455,13 @@ getfs_by_dir (const char *dir) { + + cdir = canonicalize(dir); + for (mc = mc0->nxt; mc && mc != mc0; mc = mc->nxt) { +- if (streq(mc->m.mnt_dir, cdir)) { ++ int ok = streq(mc->m.mnt_dir, cdir); ++ if (!ok) { ++ char *dr = canonicalize(mc->m.mnt_dir); ++ ok = dr ? streq(dr, cdir) : 0; ++ free(dr); ++ } ++ if (ok) { + free(cdir); + return mc; + } +-- +1.7.5.2 + diff --git a/util-linux.spec b/util-linux.spec index 74eb0a2..00d7e8e 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.19.1 -Release: 1.1%{?dist} +Release: 1.2%{?dist} License: GPLv2 and GPLv2+ and GPLv3+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: http://kernel.org/~kzak/util-linux/ @@ -91,7 +91,8 @@ Patch9: util-linux-2.19-kernel-version.patch # 709319 - 'mount -a' mounts already mounted directories Patch10: util-linux-2.19-libmount-mounted.patch Patch11: util-linux-2.19-mount-a-bind.patch - +# 709681 - failure to mount if a mount point ends with a slash in /etc/fstab +Patch12: util-linux-2.19-mount-fsname.patch %description The util-linux package contains a large variety of low-level system @@ -209,6 +210,7 @@ cp %{SOURCE8} %{SOURCE9} . %patch9 -p1 %patch10 -p1 %patch11 -p1 +%patch12 -p1 %build @@ -755,6 +757,9 @@ fi %changelog +* Tue Jun 14 2011 Karel Zak 2.19.1-1.2 +- fix #709681 - failure to mount if a mount point ends with a slash in /etc/fstab + * Tue Jun 14 2011 Karel Zak 2.19.1-1.1 - fix #709319 - 'mount -a' mounts already mounted directories - fix kernel version parsing