rpms/acl/devel acl-2.2.49-setfacl-restore.patch, NONE, 1.1 acl.spec, 1.57, 1.58

Kamil Dudka kdudka at fedoraproject.org
Wed Mar 24 16:47:35 UTC 2010


Author: kdudka

Update of /cvs/extras/rpms/acl/devel
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv27378

Modified Files:
	acl.spec 
Added Files:
	acl-2.2.49-setfacl-restore.patch 
Log Message:
- prevent setfacl --restore from SIGSEGV on malformed restore file (#576550)

acl-2.2.49-setfacl-restore.patch:
 setfacl/setfacl.c |    2 +-
 test/misc.test    |    6 ++++++
 2 files changed, 7 insertions(+), 1 deletion(-)

--- NEW FILE acl-2.2.49-setfacl-restore.patch ---
diff --git a/setfacl/setfacl.c b/setfacl/setfacl.c
index 7142af0..23784a7 100644
--- a/setfacl/setfacl.c
+++ b/setfacl/setfacl.c
@@ -125,7 +125,7 @@ restore(
 	uid_t uid;
 	gid_t gid;
 	mode_t mask, flags;
-	struct do_set_args args;
+	struct do_set_args args = { 0 };
 	int line = 0, backup_line;
 	int error, status = 0;
 	int chmod_required = 0;
diff --git a/test/misc.test b/test/misc.test
index e6140da..a910bd0 100644
--- a/test/misc.test
+++ b/test/misc.test
@@ -424,3 +424,9 @@ Now, chmod should change the group_obj entry
 	> 
 
 	$ rmdir d
+
+Malformed restore file
+        
+        $ echo "# owner: root" > f
+        $ setfacl --restore=f 2>&1
+        >setfacl: f: No filename found in line 0, aborting


Index: acl.spec
===================================================================
RCS file: /cvs/extras/rpms/acl/devel/acl.spec,v
retrieving revision 1.57
retrieving revision 1.58
diff -u -p -r1.57 -r1.58
--- acl.spec	10 Mar 2010 14:10:14 -0000	1.57
+++ acl.spec	24 Mar 2010 16:47:34 -0000	1.58
@@ -1,7 +1,7 @@
 Summary: Access control list utilities
 Name: acl
 Version: 2.2.49
-Release: 5%{?dist}
+Release: 6%{?dist}
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildRequires: gawk
 BuildRequires: gettext
@@ -19,6 +19,9 @@ Patch3: acl-2.2.49-bz467936.patch
 # prepare the test-suite for SELinux and arbitrary umask
 Patch4: acl-2.2.49-tests.patch
 
+# bz #576550
+Patch5: acl-2.2.49-setfacl-restore.patch
+
 License: GPLv2+
 Group: System Environment/Base
 URL: http://oss.sgi.com/projects/xfs/
@@ -57,11 +60,17 @@ defined in POSIX 1003.1e draft standard 
 %patch2 -p1
 %patch3 -p1
 %patch4 -p1
+%patch5 -p1
 
 %build
 touch .census
 # acl abuses libexecdir
 %configure --libdir=/%{_lib} --libexecdir=%{_libdir}
+
+# uncomment to turn on optimizations
+# sed -i 's/-O2/-O0/' libtool include/builddefs
+# unset CFLAGS
+
 make %{?_smp_mflags} LIBTOOL="libtool --tag=CC"
 
 %check
@@ -125,6 +134,9 @@ rm -rf $RPM_BUILD_ROOT
 /%{_lib}/libacl.so.*
 
 %changelog
+* Wed Mar 24 2010 Kamil Dudka <kdudka at redhat.com> 2.2.49-6
+- prevent setfacl --restore from SIGSEGV on malformed restore file (#576550)
+
 * Wed Mar 10 2010 Kamil Dudka <kdudka at redhat.com> 2.2.49-5
 - run the test-suite if possible
 



More information about the scm-commits mailing list