Hello community,
here is the log from the commit of package evms
checked in at Mon Aug 6 21:57:38 CEST 2007.
--------
--- evms/evms.changes 2007-07-14 18:48:01.000000000 +0200
+++ /mounts/work_src_done/STABLE/evms/evms.changes 2007-08-05 22:08:44.000000000 +0200
@@ -1,0 +2,7 @@
+Sun Aug 5 22:08:08 CEST 2007 - olh@suse.de
+
+- remove PAGE_SIZE usage, remove asm/page.h inclusion
+ fix out-of-bounds access in FAT label handling
+ build parallel
+
+-------------------------------------------------------------------
New:
----
evms.md_info-resync_status.patch
evms.PAGE_SIZE.patch
evms.utils-out-of-bounds.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ evms.spec ++++++
--- /var/tmp/diff_new_pack.M18075/_old 2007-08-06 21:56:45.000000000 +0200
+++ /var/tmp/diff_new_pack.M18075/_new 2007-08-06 21:56:45.000000000 +0200
@@ -21,7 +21,7 @@
%endif
Autoreqprov: on
Version: 2.5.5
-Release: 138
+Release: 148
Summary: EVMS--Enterprise Volume Management System
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source: http://prdownloads.sourceforge.net/evms/evms-%{version}.tar.bz2
@@ -59,6 +59,9 @@
Patch26: tunable_timeout.patch
Patch27: blocked_plugin_msg.patch
Patch28: lvm_pv_metadata.patch
+Patch29: evms.PAGE_SIZE.patch
+Patch30: evms.md_info-resync_status.patch
+Patch31: evms.utils-out-of-bounds.patch
%description
This package contains the userspace tools needed to manage EVMS
@@ -126,7 +129,7 @@
Joy Yokley Goodreau
%prep
-%setup -a3
+%setup -q -a3
%patch
%patch1
%patch2
@@ -156,11 +159,14 @@
%patch26
%patch27
%patch28
+%patch29 -p1
+%patch30 -p1
+%patch31 -p1
%build
autoconf
CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" ./configure --mandir=/usr/share/man --disable-ha --exec-prefix=/ --libdir=/%_lib
-make
+%{__make} %{?jobs:-j%jobs}
%install
rm -rf $RPM_BUILD_ROOT
@@ -241,6 +247,10 @@
/usr/include/evms/*.h
%changelog
+* Sun Aug 05 2007 - olh@suse.de
+- remove PAGE_SIZE usage, remove asm/page.h inclusion
+ fix out-of-bounds access in FAT label handling
+ build parallel
* Sat Jul 14 2007 - aj@suse.de
- Require heartbeat-devel.
* Wed May 23 2007 - cgao@novell.com
++++++ evms.md_info-resync_status.patch ++++++
md_info.c:130: warning: the address of 'resync_status' will always evaluate as 'true'
---
plugins/md/md_info.c | 2 +-
plugins/md/md_main.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
--- a/plugins/md/md_info.c
+++ b/plugins/md/md_info.c
@@ -127,7 +127,7 @@ static int md_get_volume_info( md_volume
strcat(message_buffer, _("Active"));
}
if (mdstat_check_recovery(vol->md_minor, resync_status)) {
- if (resync_status) {
+ if (resync_status[0]) {
if (message_buffer[0] != '\0') {
strcat(message_buffer, ", ");
}
--- a/plugins/md/md_main.c
+++ b/plugins/md/md_main.c
@@ -587,7 +587,7 @@ boolean mdstat_check_recovery(int mddev_
//caller wants status
sscanf(p, " =%3lu.%lu%% (%lu/%lu)",
&percent_whole, &percent_hundredth, &count, &total);
- sprintf(status, " =%3lu.%lu%% (%lu/%lu)",
+ snprintf(status, 64, " =%3lu.%lu%% (%lu/%lu)",
percent_whole, percent_hundredth, count, total);
}
} else {
++++++ evms.PAGE_SIZE.patch ++++++
---
plugins/lvm/lvmregmgr.h | 4 +++-
plugins/swap/swapfs.c | 3 +--
plugins/swap/swapfs.h | 4 ++--
plugins/xfs/fsimxfs.h | 2 +-
4 files changed, 7 insertions(+), 6 deletions(-)
--- a/plugins/lvm/lvmregmgr.h
+++ b/plugins/lvm/lvmregmgr.h
@@ -19,6 +19,8 @@
* File: evms2/engine/plugins/lvm/lvmregmgr.h
*/
+#include
+
/* Datatypes and Defs used in lvmregmgr.c. */
#define SECTOR_SIZE_BITS 9
#define PAGE_SIZE_SECTORS 16 /* for 8k pages. */
@@ -43,7 +45,7 @@
#define SECTOR_SIZE 512
#endif
#ifndef PAGE_SIZE
-#define PAGE_SIZE 4096
+#define PAGE_SIZE getpagesize()
#endif
#define MAX_VG 99
#define MAX_LV 256
--- a/plugins/swap/swapfs.c
+++ b/plugins/swap/swapfs.c
@@ -27,7 +27,6 @@
#include
#include
#include
-#include /* to get PAGE_SIZE */
#include
#include "swapfs.h"
@@ -341,7 +340,7 @@ static int swap_get_fs_limits(logical_vo
*max_volume_size = (sector_count_t)-1; /* No limit. */
*max_object_size = (sector_count_t)-1; /* No limit. */
- *min_size = (sector_count_t)(PAGE_SIZE * 10); /* 10 page minimum. */
+ *min_size = (sector_count_t)(getpagesize() * 10); /* 10 page minimum. */
LOG_EXTRA("Volume: %s, min: %"PRIu64", max: %"PRIu64"\n",
volume->name, *min_size, *max_volume_size);
--- a/plugins/swap/swapfs.h
+++ b/plugins/swap/swapfs.h
@@ -47,8 +47,8 @@ extern engine_functions_t *EngFncs;
#define PUT 1
#define SWAPFS_MAGIC_STRING "SWAP_SPACE"
#define SWAPFS_MAGIC_STRING2 "SWAPSPACE2"
-#define SWAPFS_MIN_SIZE (PAGE_SIZE / EVMS_VSECTOR_SIZE * 10)
-#define SWAP_MAGIC_OFFSET_IN_BYTES (PAGE_SIZE - 10) /* last 10 bytes of first page */
+#define SWAPFS_MIN_SIZE (getpagesize() / EVMS_VSECTOR_SIZE * 10)
+#define SWAP_MAGIC_OFFSET_IN_BYTES (getpagesize() - 10) /* last 10 bytes of first page */
#define EVMS_Task_swapon EVMS_Task_Plugin_Function + 1
#define EVMS_Task_swapoff EVMS_Task_Plugin_Function + 2
--- a/plugins/xfs/fsimxfs.h
+++ b/plugins/xfs/fsimxfs.h
@@ -165,7 +165,7 @@ typedef struct xfs_volume {
* superblock. This is not the same as the superblock structure, since all of
* this space is not currently being used.
*/
-#define SIZE_OF_SUPER PAGE_SIZE
+#define SIZE_OF_SUPER getpagesize()
/* Fixed byte offset of primary superblock */
#define XFS_SUPER1_OFF 0x00
++++++ evms.utils-out-of-bounds.patch ++++++
utils.c:150: warning: array subscript is above array bounds
utils.c:152: warning: array subscript is above array bounds
---
plugins/fat/utils.c | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
--- a/plugins/fat/utils.c
+++ b/plugins/fat/utils.c
@@ -72,6 +72,7 @@ int fill_private_data(int isfat16,
logical_volume_t *vol,
const fat_boot_sector *boot)
{
+ char dummy[11 + 1];
private_data_t *pd = vol->private_data;
u_int16_t sectors;
@@ -99,8 +100,9 @@ int fill_private_data(int isfat16,
pd->vol_id = isfat16 ? DISK_TO_CPU32(boot->fat.vi.volume_id)
: DISK_TO_CPU32(boot->fat32.vi.volume_id);
- pd->vol_name = isfat16 ? EngFncs->engine_strdup((char *)boot->fat.vi.volume_label)
- : EngFncs->engine_strdup((char *)boot->fat32.vi.volume_label);
+ memcpy(dummy, isfat16 ? boot->fat.vi.volume_label : boot->fat32.vi.volume_label, sizeof(dummy) - 1);
+ dummy[11] = '\0';
+ pd->vol_name = EngFncs->engine_strdup(dummy);
LOG_EXIT_INT(0);
return 0;
@@ -145,12 +147,6 @@ int get_fat_boot(int isfat16, logical_vo
}
EngFncs->close_volume(ev, fd);
- /* FIXME: trim space chars */
- if (isfat16) {
- boot->fat.vi.volume_label[11] = '\0';
- } else {
- boot->fat32.vi.volume_label[11] = '\0';
- }
LOG_EXIT_INT(rc);
return rc;
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org