rpms/libselinux/FC-6 libselinux-rhat.patch, 1.93, 1.94 libselinux.spec, 1.230, 1.231

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Wed Dec 6 19:38:57 UTC 2006


Author: dwalsh

Update of /cvs/dist/rpms/libselinux/FC-6
In directory cvs.devel.redhat.com:/tmp/cvs-serv16358

Modified Files:
	libselinux-rhat.patch libselinux.spec 
Log Message:
* Wed Dec 6 2006 Dan Walsh <dwalsh at redhat.com> - 1.33.2-3
- Fix matchpathcon to lstat files


libselinux-rhat.patch:
 matchpathcon   |binary
 matchpathcon.c |   20 ++++++++++++++------
 2 files changed, 14 insertions(+), 6 deletions(-)

Index: libselinux-rhat.patch
===================================================================
RCS file: /cvs/dist/rpms/libselinux/FC-6/libselinux-rhat.patch,v
retrieving revision 1.93
retrieving revision 1.94
diff -u -r1.93 -r1.94
--- libselinux-rhat.patch	29 Nov 2006 21:01:29 -0000	1.93
+++ libselinux-rhat.patch	6 Dec 2006 19:38:55 -0000	1.94
@@ -1,16 +1,64 @@
-diff --exclude-from=exclude -N -u -r nsalibselinux/include/selinux/av_permissions.h libselinux-1.33.1/include/selinux/av_permissions.h
---- nsalibselinux/include/selinux/av_permissions.h	2006-10-24 12:49:23.000000000 -0400
-+++ libselinux-1.33.1/include/selinux/av_permissions.h	2006-11-03 16:56:52.000000000 -0500
-@@ -896,3 +896,4 @@
- #define KEY__SETATTR                              0x00000020UL
- #define KEY__CREATE                               0x00000040UL
- #define CONTEXT__TRANSLATE                        0x00000001UL
-+#define CONTEXT__CONTAINS                         0x00000002UL
-diff --exclude-from=exclude -N -u -r nsalibselinux/src/av_perm_to_string.h libselinux-1.33.1/src/av_perm_to_string.h
---- nsalibselinux/src/av_perm_to_string.h	2006-10-24 12:49:23.000000000 -0400
-+++ libselinux-1.33.1/src/av_perm_to_string.h	2006-11-03 16:57:58.000000000 -0500
-@@ -266,3 +266,4 @@
-     S_(SECCLASS_KEY, KEY__SETATTR, "setattr")
-     S_(SECCLASS_KEY, KEY__CREATE, "create")
-     S_(SECCLASS_CONTEXT, CONTEXT__TRANSLATE, "translate")
-+    S_(SECCLASS_CONTEXT, CONTEXT__CONTAINS, "contains")
+Binary files nsalibselinux/utils/matchpathcon and libselinux-1.33.2/utils/matchpathcon differ
+diff --exclude-from=exclude -N -u -r nsalibselinux/utils/matchpathcon.c libselinux-1.33.2/utils/matchpathcon.c
+--- nsalibselinux/utils/matchpathcon.c	2006-11-16 17:15:17.000000000 -0500
++++ libselinux-1.33.2/utils/matchpathcon.c	2006-12-06 14:11:29.000000000 -0500
+@@ -4,20 +4,23 @@
+ #include <getopt.h>
+ #include <errno.h>
+ #include <string.h>
++#include <sys/types.h>
++#include <sys/stat.h>
++#include <sys/errno.h>
+ #include <selinux/selinux.h>
+ 
+ void usage(const char *progname)
+ {
+ 	fprintf(stderr,
+-		"usage:  %s [-n] [-f file_contexts] [-p prefix] path...\n",
++		"usage:  %s [-N] [-n] [-f file_contexts] [-p prefix] [-V] path...\n",
+ 		progname);
+ 	exit(1);
+ }
+ 
+-int printmatchpathcon(char *path, int header)
++int printmatchpathcon(char *path, int header, int mode)
+ {
+ 	char *buf;
+-	int rc = matchpathcon(path, 0, &buf);
++	int rc = matchpathcon(path, mode, &buf);
+ 	if (rc < 0) {
+ 		fprintf(stderr, "matchpathcon(%s) failed: %s\n", path,
+ 			strerror(errno));
+@@ -92,6 +95,11 @@
+ 		}
+ 	}
+ 	for (i = optind; i < argc; i++) {
++		int mode=0;
++		struct stat buf;
++		if (lstat(argv[i], &buf) == 0)
++			mode = buf.st_mode;
++
+ 		if (verify) {
+ 			if (selinux_file_context_verify(argv[i], 0)) {
+ 				printf("%s verified.\n", argv[i]);
+@@ -106,17 +114,17 @@
+ 				if (rc >= 0) {
+ 					printf("%s has context %s, should be ",
+ 					       argv[i], con);
+-					error += printmatchpathcon(argv[i], 0);
++					error += printmatchpathcon(argv[i], 0, mode);
+ 					freecon(con);
+ 				} else {
+ 					printf
+ 					    ("actual context unknown: %s, should be ",
+ 					     strerror(errno));
+-					error += printmatchpathcon(argv[i], 0);
++					error += printmatchpathcon(argv[i], 0,mode);
+ 				}
+ 			}
+ 		} else {
+-			error += printmatchpathcon(argv[i], header);
++			error += printmatchpathcon(argv[i], header, mode);
+ 		}
+ 	}
+ 	matchpathcon_fini();


Index: libselinux.spec
===================================================================
RCS file: /cvs/dist/rpms/libselinux/FC-6/libselinux.spec,v
retrieving revision 1.230
retrieving revision 1.231
diff -u -r1.230 -r1.231
--- libselinux.spec	29 Nov 2006 21:01:29 -0000	1.230
+++ libselinux.spec	6 Dec 2006 19:38:55 -0000	1.231
@@ -2,10 +2,11 @@
 Summary: SELinux library and simple utilities
 Name: libselinux
 Version: 1.33.2
-Release: 1%{?dist}
+Release: 3%{?dist}
 License: Public domain (uncopyrighted)
 Group: System Environment/Libraries
 Source: http://www.nsa.gov/selinux/archives/%{name}-%{version}.tgz
+Patch: libselinux-rhat.patch
 
 BuildRequires: libsepol-devel >= %{libsepolver} swig
 Requires: libsepol >= %{libsepolver} setransd
@@ -48,6 +49,7 @@
 
 %prep
 %setup -q
+%patch -p1 -b .rhat
 
 %build
 make clean
@@ -117,6 +119,12 @@
 %{_libdir}/python*/site-packages/selinux.py*
 
 %changelog
+* Wed Dec 6 2006 Dan Walsh <dwalsh at redhat.com> - 1.33.2-3
+- Fix matchpathcon to lstat files
+
+* Thu Nov 30 2006 Dan Walsh <dwalsh at redhat.com> - 1.33.2-2
+- Update man page
+
 * Tue Nov 14 2006 Dan Walsh <dwalsh at redhat.com> - 1.33.2-1
 - Upgrade to upstream
 




More information about the fedora-cvs-commits mailing list