diff --git a/dmraid-fdleak.patch b/dmraid-fdleak.patch new file mode 100644 index 0000000..ef94d23 --- /dev/null +++ b/dmraid-fdleak.patch @@ -0,0 +1,20 @@ +Index: libdmraid-events/libdmraid-events.c +=================================================================== +--- libdmraid-events/libdmraid-events.c.orig 2008-07-18 23:30:05.000000000 +0200 ++++ libdmraid-events/libdmraid-events.c 2009-10-03 14:55:34.000000000 +0200 +@@ -180,6 +180,7 @@ static int _repopulate(const char* devic + } + fscanf(fd, "%s", curr->raid_mem[curr->num_sata_drives].major_minor); + fclose(fd); ++ closedir(dir); + curr->raid_mem[curr->num_sata_drives].port_num = atoi(dir_ent[i]->d_name); + syslog(LOG_INFO, "Added disk %s (%s) port=%i\n", + disk, curr->raid_mem[curr->num_sata_drives].major_minor, curr->raid_mem[curr->num_sata_drives].port_num); +@@ -969,6 +970,7 @@ int register_device(const char *device, + } + fscanf(fd, "%s", rv_next->raid_mem[m].major_minor); + fclose(fd); ++ closedir(dir); + rv_next->raid_mem[m].port_num = atoi(dir_ent[j]->d_name); + m++; + break; diff --git a/dmraid.changes b/dmraid.changes index 5ef21a3..323363b 100644 --- a/dmraid.changes +++ b/dmraid.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sat Oct 3 13:21:37 UTC 2009 - crrodriguez@opensuse.org + +- fix directory handle leaks in libdmraid-events [bnc#524202] + ------------------------------------------------------------------- Mon Aug 24 21:28:51 UTC 2009 - hvogel@novell.com diff --git a/dmraid.spec b/dmraid.spec index 39e813e..7b066ae 100644 --- a/dmraid.spec +++ b/dmraid.spec @@ -28,7 +28,7 @@ Group: System/Base AutoReqProv: on Summary: A Device-Mapper Software RAID Support Tool Version: 1.0.0.rc15 -Release: 7 +Release: 8 Source: ftp://people.redhat.com/heinzm/sw/dmraid/src/dmraid-%{version}.tar.bz2 Source1: sysconfig.dmraid Source2: boot.dmraid @@ -46,6 +46,7 @@ Patch11: dmraid-1.0.0.rc15-scsi_serial_remove_ws.patch Patch13: dmraid-1.0.0.rc15-isw-raid10.patch Patch14: dmraid-1.0.0.rc15-rm_partitions.patch Patch15: dmraid-1.0.0.rc15-isw-serial.patch +Patch16: dmraid-fdleak.patch Patch500: ARM_libdmraid_ldflags.diff # libdmraid-events Patch50: libdmraid-events.dif @@ -120,6 +121,7 @@ Authors: %patch13 -p1 %patch14 -p1 %patch15 -p1 +%patch16 pushd libdmraid* %patch50 %patch500 -p1