diff --git a/lvm2-2_02_73-fix-exported-syms.patch b/lvm2-2_02_73-fix-exported-syms.patch index 6801dcb..496cd7e 100644 --- a/lvm2-2_02_73-fix-exported-syms.patch +++ b/lvm2-2_02_73-fix-exported-syms.patch @@ -1,20 +1,127 @@ ---- LVM2.2.02.72/make.tmpl.in 2010-07-20 15:38:44.000000000 +0100 -+++ LVM2.2.02.72-fix/make.tmpl.in 2010-07-31 15:16:55.000000000 +0100 -@@ -366,7 +366,7 @@ +--- LVM2.2.02.72/configure 2010-07-28 14:55:42.000000000 +0100 ++++ LVM2/configure 2010-07-31 01:42:09.000000000 +0100 +@@ -691,6 +691,7 @@ + DMEVENTD + DL_LIBS + DEVMAPPER ++DEFAULT_RUN_DIR + DEFAULT_LOCK_DIR + DEFAULT_CACHE_SUBDIR + DEFAULT_BACKUP_SUBDIR +@@ -18043,6 +18044,7 @@ + + + ++ + ################################################################################ + ac_config_files="$ac_config_files Makefile make.tmpl daemons/Makefile daemons/clvmd/Makefile daemons/cmirrord/Makefile daemons/dmeventd/Makefile daemons/dmeventd/libdevmapper-event.pc daemons/dmeventd/plugins/Makefile daemons/dmeventd/plugins/lvm2/Makefile daemons/dmeventd/plugins/mirror/Makefile daemons/dmeventd/plugins/snapshot/Makefile doc/Makefile doc/example.conf include/.symlinks include/Makefile lib/Makefile lib/format1/Makefile lib/format_pool/Makefile lib/locking/Makefile lib/mirror/Makefile lib/replicator/Makefile lib/misc/lvm-version.h lib/snapshot/Makefile libdm/Makefile libdm/libdevmapper.pc liblvm/Makefile liblvm/liblvm2app.pc man/Makefile po/Makefile scripts/clvmd_init_red_hat scripts/cmirrord_init_red_hat scripts/lvm2_monitoring_init_red_hat scripts/Makefile test/Makefile test/api/Makefile tools/Makefile udev/Makefile unit-tests/datastruct/Makefile unit-tests/regex/Makefile" + +diff -ru LVM2.2.02.72/configure.in LVM2/configure.in +--- LVM2.2.02.72/configure.in 2010-07-28 14:55:42.000000000 +0100 ++++ LVM2/configure.in 2010-07-31 01:41:58.000000000 +0100 +@@ -1232,6 +1232,7 @@ + AC_SUBST(DEFAULT_BACKUP_SUBDIR) + AC_SUBST(DEFAULT_CACHE_SUBDIR) + AC_SUBST(DEFAULT_LOCK_DIR) ++AC_SUBST(DEFAULT_RUN_DIR) + AC_SUBST(DEVMAPPER) + AC_SUBST(DLM_CFLAGS) + AC_SUBST(DLM_LIBS) +--- LVM2.2.02.72/lib/metadata/metadata.c 2010-07-09 17:57:44.000000000 +0100 ++++ LVM2/lib/metadata/metadata.c 2010-07-31 01:41:21.000000000 +0100 +@@ -1199,11 +1199,6 @@ + + int vg_set_mda_copies(struct volume_group *vg, uint32_t mda_copies) + { +- /* FIXME: add checks, etc, and set the value */ +- /* +- * FIXME: Before we set a larger value, we may need to +- * enable some mdas on PVS +- */ + vg->mda_copies = mda_copies; + + /* FIXME Use log_verbose when this is due to specific cmdline request. */ +--- LVM2.2.02.72/liblvm/lvm2app.h 2010-07-12 19:29:31.000000000 +0100 ++++ LVM2/liblvm/lvm2app.h 2010-08-02 13:20:12.000000000 +0100 +@@ -14,7 +14,7 @@ + #ifndef _LIB_LVM2APP_H + #define _LIB_LVM2APP_H + +-#include "libdevmapper.h" ++#include + + #include + +--- LVM2.2.02.72/Makefile.in 2010-07-28 14:55:42.000000000 +0100 ++++ LVM2/Makefile.in 2010-08-02 13:08:23.000000000 +0100 +@@ -50,6 +50,7 @@ + po: tools daemons + + libdm.device-mapper: include.device-mapper ++liblvm.device-mapper: include.device-mapper + daemons.device-mapper: libdm.device-mapper + tools.device-mapper: libdm.device-mapper + device-mapper: tools.device-mapper daemons.device-mapper man.device-mapper +--- LVM2.2.02.72/make.tmpl.in 2010-08-02 14:17:38.000000000 +0100 ++++ LVM2/make.tmpl.in 2010-08-02 13:56:38.000000000 +0100 +@@ -360,7 +360,7 @@ + set -e; \ + ( cat $(srcdir)/.exported_symbols; \ + if test x$(EXPORTED_HEADER) != x; then \ +- $(CC) -E -P $(EXPORTED_HEADER) | \ ++ $(CC) -E -P $(INCLUDES) $(DEFS) $(CFLAGS) $(EXPORTED_HEADER) | \ + $(SED) -ne "/^typedef|}/!s/.*[ \*]\(\$(EXPORTED_FN_PREFIX)_[a-z0-9_]*\)(.*/\1/p"; \ + fi \ ) > $@ +--- LVM2.2.02.72/tools/lvconvert.c 2010-07-13 23:04:36.000000000 +0100 ++++ LVM2/tools/lvconvert.c 2010-07-31 01:41:22.000000000 +0100 +@@ -1237,25 +1237,27 @@ + if (!(lp->failed_pvs = _failed_pv_list(lv->vg))) + return_0; + ++ log_count = new_log_count; ++ + /* + * We must adjust the log first, or the entire mirror + * will get stuck during a suspend. + */ +- if (!_lv_update_mirrored_log(lv, lp->failed_pvs, new_log_count)) ++ if (!_lv_update_mirrored_log(lv, lp->failed_pvs, log_count)) + return 0; + + if (lp->mirrors == 1) +- new_log_count = 0; ++ log_count = 0; + + if (failed_mirrors) { + if (!lv_remove_mirrors(cmd, lv, failed_mirrors, +- new_log_count ? 0U : 1U, ++ log_count ? 0U : 1U, + _is_partial_lv, NULL, 0)) + return 0; + } - .export.sym: .exported_symbols_generated -- set -e; (echo "Base {"; echo " global:"; \ -+ set -e; (echo "{"; echo " global:"; \ - sed "s/^/ /;s/$$/;/" < $<; \ - echo " local:"; echo " *;"; echo "};") > $@ + if (!_lv_update_log_type(cmd, lp, lv, lp->failed_pvs, +- new_log_count)) ++ log_count)) + return 0; ---- LVM2.2.02.72/WHATS_NEW 2010-07-31 15:18:09.000000000 +0100 -+++ LVM2.2.02.72-fix/WHATS_NEW 2010-07-31 15:20:22.000000000 +0100 -@@ -1,3 +1,7 @@ + if (!_reload_lv(cmd, lv)) +--- LVM2.2.02.72/VERSION 2010-07-28 15:06:21.000000000 +0100 ++++ LVM2/VERSION 2010-07-28 22:57:51.000000000 +0100 +@@ -1 +1 @@ +-2.02.72(2) (2010-07-28) ++2.02.72(2)-f14 (2010-08-02) +--- LVM2.2.02.72/WHATS_NEW 2010-07-28 15:01:40.000000000 +0100 ++++ LVM2/WHATS_NEW 2010-08-02 13:56:24.000000000 +0100 +@@ -1,3 +1,11 @@ +Version 2.02.73 - +================================ -+ Drop explicit 'Base' version from exported symbols. ++ Fix exported_symbols generation to use standard compiler arguments. ++ Use #include <> not "" in lvm2app.h which gets installed on the system. ++ Make liblvm.device-mapper wait for include file generation. ++ Fix configure to supply DEFAULT_RUN_DIR to Makefiles. ++ Fix wrong number of mirror log at allocate policy + Version 2.02.72 - 28th July 2010 [CVE-2010-2526] ================================================= diff --git a/lvm2.spec b/lvm2.spec index 38492bd..56070bd 100644 --- a/lvm2.spec +++ b/lvm2.spec @@ -16,7 +16,7 @@ Summary: Userland logical volume management tools Name: lvm2 Version: 2.02.72 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2 Group: System Environment/Base URL: http://sources.redhat.com/lvm2 @@ -440,13 +440,17 @@ the device-mapper event library. %changelog -* Sat Jul 31 2010 Alasdair Kergon - 2.02.72-2 -- Drop explicit Base version from exported symbols. +* Sat Jul 31 2010 Alasdair Kergon - 2.02.72-3 - Address lvm2-cluster security flaw CVE-2010-2526. https://bugzilla.redhat.com/CVE-2010-2526 - Change clvmd to communicate with lvm2 via a socket in /var/run/lvm. - Return controlled error if clvmd is run by non-root user. - Never use clvmd singlenode unless explicitly requested with -Isinglenode. +- Fix exported_symbols generation to use standard compiler arguments. +- Use #include <> not "" in lvm2app.h which gets installed on the system. +- Make liblvm.device-mapper wait for include file generation. +- Fix configure to supply DEFAULT_RUN_DIR to Makefiles. +- Fix wrong number of mirror log at allocate policy * Wed Jul 28 2010 Alasdair Kergon - 2.02.71-1 - Make vgck warn about missing PVs.