diff -Nru util-linux-2.25.2/debian/changelog util-linux-2.25.2/debian/changelog --- util-linux-2.25.2/debian/changelog 2015-02-23 03:04:00.000000000 -0500 +++ util-linux-2.25.2/debian/changelog 2015-05-04 23:45:12.000000000 -0400 @@ -1,3 +1,58 @@ +util-linux (2.25.2-6ubuntu1) wily; urgency=low + + * Merge from Debian unstable (LP: #1452099). Remaining changes: + - Regularly trim SSDs automatically (core-1311-ssd-trimming): + + Add debian/fstrim-all.cron: Call fstrim --all. Installed as + /etc/cron.weekly/fstrim. + - Upstart support: + + Add hwclock{-save}.upstart, and install them in debian/rules. + + Drop debian/hwclock.rules and hwclock.default. + - Add mountall-options.patch, see patch header. + - Add debian/libblkid1.maintscript to clean up /etc/blkid.conf on upgrade. + This needs to be kept until after Ubuntu 16.04 LTS. + - Add missing libudev-dev build-dependency. This makes the "LABEL" + information of lsblk available for non-root users + + -- Anders Kaseorg Mon, 04 May 2015 23:44:15 -0400 + +util-linux (2.25.2-6) unstable; urgency=medium + + * Add patch to fix `unshare -r` regression. + - Cherry-picked upstream commit 0bf159413bdb9e32486 + "unshare: Fix --map-root-user to work on new kernels" + Thanks to Kirill Smelkov (Closes: #780841) + + -- Andreas Henriksson Mon, 30 Mar 2015 00:28:09 +0200 + +util-linux (2.25.2-5) unstable; urgency=medium + + * Revert "Trigger update of initramfs on upgrades" (Closes: #773354) + * Revert "Add Breaks: live-tools (<<4.0~alpha17-1)" + - No longer needed since dropping the update-initramfs call. + * Fix typo in symlink_to_dir and bump prior-version + - in other words, fix 2.25.2-4.1 upload. (Closes: #775350) + * Add Breaks: grml-debootstrap (<< 0.68) + - previous versions does not work properly with new util-linux which + always identifies atleast one label for every partition (PARTUUID) + so lets prevent partial upgrades. (Closes: #772846) + + -- Andreas Henriksson Tue, 03 Feb 2015 20:55:38 +0100 + +util-linux (2.25.2-4.2) unstable; urgency=medium + + * Non-maintainer upload. + * Add Breaks: live-tools (<<4.0~alpha17-1) (Closes: #773354) + + -- Gaudenz Steinlin Sun, 01 Feb 2015 13:16:26 +0100 + +util-linux (2.25.2-4.1) unstable; urgency=medium + + * Non-maintainer upload. + * Fix unhandled symlink_to_dir conversion for + /usr/share/doc/libblkid-dev (Closes: #775350) + + -- Jonathan Wiltshire Sat, 17 Jan 2015 16:17:40 +0000 + util-linux (2.25.2-4ubuntu2) vivid; urgency=low * Add missing libudev-dev build-dependency. This makes the "LABEL" diff -Nru util-linux-2.25.2/debian/control util-linux-2.25.2/debian/control --- util-linux-2.25.2/debian/control 2015-02-03 03:06:41.000000000 -0500 +++ util-linux-2.25.2/debian/control 2015-03-30 00:10:15.000000000 -0400 @@ -40,7 +40,7 @@ Depends: initscripts, lsb-base (>= 3.0-6), tzdata (>=2006c-2), ${misc:Depends} Suggests: dosfstools, kbd | console-tools, util-linux-locales Replaces: bash-completion (<< 1:2.1-3) -Breaks: bash-completion (<< 1:2.1-3) +Breaks: bash-completion (<< 1:2.1-3), grml-debootstrap (<< 0.68) Multi-Arch: foreign Description: Miscellaneous system utilities This package contains a number of important utilities, most of which @@ -136,6 +136,7 @@ Architecture: any Section: libdevel Priority: optional +Pre-Depends: ${misc:Pre-Depends} Depends: libblkid1 (= ${binary:Version}), libc6-dev | libc-dev, uuid-dev, diff -Nru util-linux-2.25.2/debian/libblkid-dev.maintscript util-linux-2.25.2/debian/libblkid-dev.maintscript --- util-linux-2.25.2/debian/libblkid-dev.maintscript 1969-12-31 19:00:00.000000000 -0500 +++ util-linux-2.25.2/debian/libblkid-dev.maintscript 2015-03-29 18:29:53.000000000 -0400 @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libblkid-dev /usr/share/doc/libblkid1 2.25.2-5~ diff -Nru util-linux-2.25.2/debian/patches/series util-linux-2.25.2/debian/patches/series --- util-linux-2.25.2/debian/patches/series 2014-12-15 01:56:10.000000000 -0500 +++ util-linux-2.25.2/debian/patches/series 2015-05-04 23:44:07.000000000 -0400 @@ -17,4 +17,5 @@ Update-Russian-translation.patch Trivial-unfuzzy.patch libblkid-care-about-unsafe-chars-in-cache.patch +unshare-Fix-map-root-user-to-work-on-new-kernels.patch mountall-options.patch diff -Nru util-linux-2.25.2/debian/patches/unshare-Fix-map-root-user-to-work-on-new-kernels.patch util-linux-2.25.2/debian/patches/unshare-Fix-map-root-user-to-work-on-new-kernels.patch --- util-linux-2.25.2/debian/patches/unshare-Fix-map-root-user-to-work-on-new-kernels.patch 1969-12-31 19:00:00.000000000 -0500 +++ util-linux-2.25.2/debian/patches/unshare-Fix-map-root-user-to-work-on-new-kernels.patch 2015-03-29 18:29:53.000000000 -0400 @@ -0,0 +1,70 @@ +From: "Eric W. Biederman" +Date: Wed, 17 Dec 2014 17:06:03 -0600 +Subject: unshare: Fix --map-root-user to work on new kernels + +In rare cases droping groups with setgroups(0, NULL) is an operation +that can grant a user additional privileges. User namespaces were +allwoing that operation to unprivileged users and that had to be +fixed. + +Update unshare --map-root-user to disable the setgroups operation +before setting the gid_map. + +This is needed as after the security fix gid_map is restricted to +privileged users unless setgroups has been disabled. + +Signed-off-by: "Eric W. Biederman" +--- + include/pathnames.h | 1 + + sys-utils/unshare.c | 19 +++++++++++++++++++ + 2 files changed, 20 insertions(+) + +diff --git a/include/pathnames.h b/include/pathnames.h +index 1cc4e15..1c53e45 100644 +--- a/include/pathnames.h ++++ b/include/pathnames.h +@@ -92,6 +92,7 @@ + + #define _PATH_PROC_UIDMAP "/proc/self/uid_map" + #define _PATH_PROC_GIDMAP "/proc/self/gid_map" ++#define _PATH_PROC_SETGROUPS "/proc/self/setgroups" + + #define _PATH_PROC_ATTR_CURRENT "/proc/self/attr/current" + #define _PATH_PROC_ATTR_EXEC "/proc/self/attr/exec" +diff --git a/sys-utils/unshare.c b/sys-utils/unshare.c +index 95e4afb..d409a7c 100644 +--- a/sys-utils/unshare.c ++++ b/sys-utils/unshare.c +@@ -39,6 +39,24 @@ + #include "pathnames.h" + #include "all-io.h" + ++static void disable_setgroups(void) ++{ ++ const char *file = _PATH_PROC_SETGROUPS; ++ const char *deny = "deny"; ++ int fd; ++ ++ fd = open(file, O_WRONLY); ++ if (fd < 0) { ++ if (errno == ENOENT) ++ return; ++ err(EXIT_FAILURE, _("cannot open %s"), file); ++ } ++ ++ if (write_all(fd, deny, strlen(deny))) ++ err(EXIT_FAILURE, _("write failed %s"), file); ++ close(fd); ++} ++ + static void map_id(const char *file, uint32_t from, uint32_t to) + { + char *buf; +@@ -178,6 +196,7 @@ int main(int argc, char *argv[]) + } + + if (maproot) { ++ disable_setgroups(); + map_id(_PATH_PROC_UIDMAP, 0, real_euid); + map_id(_PATH_PROC_GIDMAP, 0, real_egid); + } diff -Nru util-linux-2.25.2/debian/util-linux.postinst util-linux-2.25.2/debian/util-linux.postinst --- util-linux-2.25.2/debian/util-linux.postinst 2014-12-12 12:26:14.000000000 -0500 +++ util-linux-2.25.2/debian/util-linux.postinst 2015-03-30 00:10:15.000000000 -0400 @@ -21,10 +21,4 @@ rm -f /usr/doc/util-linux fi -# (hwclock-related) parts of this package are being pulled into initramfs, -# so trigger an update of the initramfs. -if [ -x /usr/sbin/update-initramfs ]; then - /usr/sbin/update-initramfs -u -fi - #DEBHELPER#