- Avoid the calling of stat for strings that don't begin with the "/" char
(#353191).
This commit is contained in:
parent
cef96d5996
commit
4c46e17f88
13
parted-1.8.8-avoid-none-stat.patch
Normal file
13
parted-1.8.8-avoid-none-stat.patch
Normal file
@ -0,0 +1,13 @@
|
||||
diff --git a/libparted/arch/linux.c b/libparted/arch/linux.c
|
||||
index 83e24c8..8734ab7 100644
|
||||
--- a/libparted/arch/linux.c
|
||||
+++ b/libparted/arch/linux.c
|
||||
@@ -2107,6 +2107,8 @@ _mount_table_search (const char* file_name, dev_t dev)
|
||||
return 0;
|
||||
while (fgets (line, 512, file)) {
|
||||
junk = sscanf (line, "%s", part_name);
|
||||
+ if (part_name[0] != '/')
|
||||
+ continue;
|
||||
if (stat (part_name, &part_stat) == 0) {
|
||||
if (part_stat.st_rdev == dev) {
|
||||
fclose (file);
|
@ -4,7 +4,7 @@
|
||||
Summary: The GNU disk partition manipulation program
|
||||
Name: parted
|
||||
Version: 1.8.8
|
||||
Release: 11%{?dist}
|
||||
Release: 12%{?dist}
|
||||
License: GPLv3+
|
||||
Group: Applications/System
|
||||
URL: http://www.gnu.org/software/parted
|
||||
@ -21,6 +21,7 @@ Patch7: %{name}-1.8.8-dospartrec.patch
|
||||
Patch8: %{name}-1.8.8-appletv.patch
|
||||
Patch9: %{name}-1.8.8-s390-compile.patch
|
||||
Patch10: %{name}-1.8.8-sparc-enableraid.patch
|
||||
Patch11: %{name}-1.8.8-avoid-none-stat.patch
|
||||
|
||||
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
BuildRequires: e2fsprogs-devel
|
||||
@ -68,6 +69,7 @@ Parted library, you need to install this package.
|
||||
%patch8 -p1 -b .appletv
|
||||
%patch9 -p1 -b .s390-compile
|
||||
%patch10 -p1 -b .sparc-raid
|
||||
%patch11 -p1 -b .avoid-none-stat
|
||||
|
||||
%build
|
||||
%configure --enable-device-mapper --enable-selinux --disable-static
|
||||
@ -125,6 +127,9 @@ fi
|
||||
%{_exec_prefix}/%{_lib}/pkgconfig/libparted.pc
|
||||
|
||||
%changelog
|
||||
* Thu Jan 22 2009 Joel Granados <jgranado@redhat.com> - 1.8.8.-12
|
||||
- Avoid the calling of stat for strings that don't begin with the "/" char (#353191).
|
||||
|
||||
* Sat Dec 13 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 1.8.8-11
|
||||
- fix typo in last patch
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user