From 9b695946d9a033b2b1ceef0a79f5f72955ca6f4cf51d491886ea0e32ffdddee9 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Fri, 9 Jan 2009 01:06:34 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=71 --- util-linux-2.14.1-mount_race.patch | 31 +++++++++++++++++++----------- util-linux.changes | 6 ++++++ util-linux.spec | 7 +++++-- 3 files changed, 31 insertions(+), 13 deletions(-) diff --git a/util-linux-2.14.1-mount_race.patch b/util-linux-2.14.1-mount_race.patch index 9769d1d..7c9c1f0 100644 --- a/util-linux-2.14.1-mount_race.patch +++ b/util-linux-2.14.1-mount_race.patch @@ -1,7 +1,7 @@ Index: util-linux-ng-2.14.1/mount/fstab.c =================================================================== ---- util-linux-ng-2.14.1.orig/mount/fstab.c 2008-11-24 14:26:14.000000000 +0100 -+++ util-linux-ng-2.14.1/mount/fstab.c 2008-11-24 14:45:35.000000000 +0100 +--- util-linux-ng-2.14.1.orig/mount/fstab.c 2008-05-29 01:01:02.000000000 +0200 ++++ util-linux-ng-2.14.1/mount/fstab.c 2009-01-07 12:18:03.000000000 +0100 @@ -773,8 +773,6 @@ update_mtab (const char *dir, struct my_ if (mtab_does_not_exist() || !mtab_is_writable()) return; @@ -22,8 +22,8 @@ Index: util-linux-ng-2.14.1/mount/fstab.c Index: util-linux-ng-2.14.1/mount/umount.c =================================================================== ---- util-linux-ng-2.14.1.orig/mount/umount.c 2008-11-24 14:26:14.000000000 +0100 -+++ util-linux-ng-2.14.1/mount/umount.c 2008-11-24 14:46:50.000000000 +0100 +--- util-linux-ng-2.14.1.orig/mount/umount.c 2008-07-02 15:08:50.000000000 +0200 ++++ util-linux-ng-2.14.1/mount/umount.c 2009-01-07 12:50:48.000000000 +0100 @@ -102,6 +102,8 @@ check_special_umountprog(const char *spe if (strlen(type) < 100) { sprintf(umountprog, "/sbin/umount.%s", type); @@ -84,8 +84,8 @@ Index: util-linux-ng-2.14.1/mount/umount.c int Index: util-linux-ng-2.14.1/mount/mount.c =================================================================== ---- util-linux-ng-2.14.1.orig/mount/mount.c 2008-11-24 14:26:14.000000000 +0100 -+++ util-linux-ng-2.14.1/mount/mount.c 2008-11-24 14:46:13.000000000 +0100 +--- util-linux-ng-2.14.1.orig/mount/mount.c 2009-01-07 12:18:03.000000000 +0100 ++++ util-linux-ng-2.14.1/mount/mount.c 2009-01-07 14:40:16.000000000 +0100 @@ -521,8 +521,6 @@ create_mtab (void) { int flags; mntFILE *mfp; @@ -104,7 +104,16 @@ Index: util-linux-ng-2.14.1/mount/mount.c reset_mtab_info(); } -@@ -1004,7 +1000,6 @@ update_mtab_entry(const char *spec, cons +@@ -626,6 +622,8 @@ check_special_mountprog(const char *spec + if (strlen(type) < 100) { + sprintf(mountprog, "/sbin/mount.%s", type); + if (stat(mountprog, &statbuf) == 0) { ++ /* unlock mtab if we need to exec */ ++ unlock_mtab(); + if (verbose) + fflush(stdout); + res = fork(); +@@ -1004,7 +1002,6 @@ update_mtab_entry(const char *spec, cons else { mntFILE *mfp; @@ -112,7 +121,7 @@ Index: util-linux-ng-2.14.1/mount/mount.c mfp = my_setmntent(_PATH_MOUNTED, "a+"); if (mfp == NULL || mfp->mntent_fp == NULL) { int errsv = errno; -@@ -1018,7 +1013,6 @@ update_mtab_entry(const char *spec, cons +@@ -1018,7 +1015,6 @@ update_mtab_entry(const char *spec, cons } } my_endmntent(mfp); @@ -120,7 +129,7 @@ Index: util-linux-ng-2.14.1/mount/mount.c } } my_free(mnt.mnt_fsname); -@@ -1138,12 +1132,15 @@ try_mount_one (const char *spec0, const +@@ -1138,12 +1134,15 @@ try_mount_one (const char *spec0, const mount_retry: block_signals (SIG_BLOCK); @@ -136,7 +145,7 @@ Index: util-linux-ng-2.14.1/mount/mount.c block_signals (SIG_UNBLOCK); res = status; goto out; -@@ -1163,6 +1160,7 @@ mount_retry: +@@ -1163,6 +1162,7 @@ mount_retry: pass); } @@ -144,7 +153,7 @@ Index: util-linux-ng-2.14.1/mount/mount.c block_signals (SIG_UNBLOCK); res = 0; goto out; -@@ -1173,6 +1171,7 @@ mount_retry: +@@ -1173,6 +1173,7 @@ mount_retry: if (loop) del_loop(spec); diff --git a/util-linux.changes b/util-linux.changes index 2788880..16199be 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Jan 7 15:42:38 CET 2009 - mkoenig@suse.de + +- fix locking problem for external mount helpers when type + is not given [bnc#459839] + ------------------------------------------------------------------- Tue Dec 2 12:23:37 CET 2008 - mkoenig@suse.de diff --git a/util-linux.spec b/util-linux.spec index 1035665..3dbf684 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1,7 +1,7 @@ # # spec file for package util-linux (Version 2.14.1) # -# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -30,7 +30,7 @@ License: BSD 3-Clause; GPL v2 or later Group: System/Base AutoReqProv: on Version: 2.14.1 -Release: 10 +Release: 11 Requires: %name-lang = %{version} Summary: A collection of basic system utilities Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/%name-ng-%version.tar.bz2 @@ -613,6 +613,9 @@ fi #%endif %changelog +* Wed Jan 07 2009 mkoenig@suse.de +- fix locking problem for external mount helpers when type + is not given [bnc#459839] * Tue Dec 02 2008 mkoenig@suse.de - raw: do not stat the raw devices when binding, since they are created dynamically [bnc#450675]