diff -u util-linux-2.17.2/debian/changelog util-linux-2.17.2/debian/changelog --- util-linux-2.17.2/debian/changelog +++ util-linux-2.17.2/debian/changelog @@ -1,3 +1,13 @@ +util-linux (2.17.2-0ubuntu2) lucid; urgency=low + + * Proposed bug fix for umount failing on autofs mounts as covered by + bug https://bugs.launchpad.net/ubuntu/+source/sysvinit/+bug/579858 + - Change fstab.c so it will not attempt to add an 'existing' mount that is + not found in /etc/mtab (by fstype being NULL) but issue a warning message + instead. + + -- Paul Crawford Mon, 11 Oct 2010 17:30:26 +0100 + util-linux (2.17.2-0ubuntu1) lucid; urgency=low * Merge from Debian experimental, remaining changes: diff -u util-linux-2.17.2/mount/fstab.c util-linux-2.17.2/mount/fstab.c --- util-linux-2.17.2/mount/fstab.c +++ util-linux-2.17.2/mount/fstab.c @@ -863,24 +863,32 @@ mc->m.mnt_dir = xstrdup(instead->mnt_dir); } } else if (instead) { - /* not found, add a new entry */ - absent = xmalloc(sizeof(*absent)); - absent->m.mnt_fsname = xstrdup(instead->mnt_fsname); - absent->m.mnt_dir = xstrdup(instead->mnt_dir); - absent->m.mnt_type = xstrdup(instead->mnt_type); - absent->m.mnt_opts = xstrdup(instead->mnt_opts); - absent->m.mnt_freq = instead->mnt_freq; - absent->m.mnt_passno = instead->mnt_passno; - absent->nxt = mc0; - if (mc0->prev != NULL) { - absent->prev = mc0->prev; - mc0->prev->nxt = absent; + if(instead->mnt_fsname != NULL) { + /* not found, add a new entry */ + absent = xmalloc(sizeof(*absent)); + absent->m.mnt_fsname = xstrdup(instead->mnt_fsname); + absent->m.mnt_dir = xstrdup(instead->mnt_dir); + absent->m.mnt_type = xstrdup(instead->mnt_type); + absent->m.mnt_opts = xstrdup(instead->mnt_opts); + absent->m.mnt_freq = instead->mnt_freq; + absent->m.mnt_passno = instead->mnt_passno; + absent->nxt = mc0; + if (mc0->prev != NULL) { + absent->prev = mc0->prev; + mc0->prev->nxt = absent; + } else { + absent->prev = mc0; + } + mc0->prev = absent; + if (mc0->nxt == NULL) + mc0->nxt = absent; } else { - absent->prev = mc0; + /* Trying to remount read-only an 'existing' system that is not in mtab? + * See line 258 of umount.c and https://bugs.launchpad.net/ubuntu/+source/sysvinit/+bug/579858 + */ + error (_("%s has null fsname - mtab not updated"), + instead->mnt_dir); } - mc0->prev = absent; - if (mc0->nxt == NULL) - mc0->nxt = absent; } /* write chain to mtemp */