[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

rpms/libselinux/devel libselinux-rhat.patch, 1.87, 1.88 libselinux.spec, 1.205, 1.206



Author: dwalsh

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

Modified Files:
	libselinux-rhat.patch libselinux.spec 
Log Message:
* Wed Jun 21 2006 Dan Walsh <dwalsh redhat com> 1.30.15-3
- Fix error reporting of matchpathcon


libselinux-rhat.patch:
 include/selinux/selinux.h |   12 ++++++
 man/man8/matchpathcon.8   |   18 ++++++++-
 src/matchpathcon.c        |   83 +++++++++++++++++++++++++++++++++++++++++++---
 utils/matchpathcon.c      |   65 ++++++++++++++++++++++++++++--------
 4 files changed, 156 insertions(+), 22 deletions(-)

Index: libselinux-rhat.patch
===================================================================
RCS file: /cvs/dist/rpms/libselinux/devel/libselinux-rhat.patch,v
retrieving revision 1.87
retrieving revision 1.88
diff -u -r1.87 -r1.88
--- libselinux-rhat.patch	20 Jun 2006 20:30:59 -0000	1.87
+++ libselinux-rhat.patch	21 Jun 2006 13:12:11 -0000	1.88
@@ -181,8 +181,8 @@
 +}
 diff --exclude-from=exclude -N -u -r nsalibselinux/utils/matchpathcon.c libselinux-1.30.15/utils/matchpathcon.c
 --- nsalibselinux/utils/matchpathcon.c	2006-05-18 12:11:17.000000000 -0400
-+++ libselinux-1.30.15/utils/matchpathcon.c	2006-06-20 11:30:26.000000000 -0400
-@@ -12,19 +12,43 @@
++++ libselinux-1.30.15/utils/matchpathcon.c	2006-06-21 09:05:20.000000000 -0400
+@@ -12,19 +12,44 @@
  	exit(1);
  }
  
@@ -190,8 +190,8 @@
 +	char *buf;
 +	int rc = matchpathcon(path, 0, &buf);
 +	if (rc < 0) {
-+		fprintf(stderr, "matchpathcon(%s) failed\n", path);
-+		return 2;
++		fprintf(stderr, "matchpathcon(%s) failed: %s\n", path, strerror(errno));
++		return 1;
 +	}
 +	if (header)
 +		printf("%s\t%s\n", path, buf);
@@ -210,6 +210,7 @@
  	int header=1, opt;
 +	int verify=0;
 +	int notrans=0;
++	int error=0;
  
  	if (argc < 2) usage(argv[0]);
  
@@ -229,7 +230,7 @@
  		case 'f':
  			if (init) {
  				fprintf(stderr, "%s:  -f and -p are exclusive\n", argv[0]);
-@@ -54,17 +78,29 @@
+@@ -54,18 +79,30 @@
  		}
  	}
  	for (i = optind; i < argc; i++) {
@@ -256,16 +257,18 @@
 -		freecon(buf);
 +				if (rc >= 0) {
 +					printf("%s has context %s, should be ", argv[i], con);
-+					printmatchpathcon(argv[i], 0);
++					error += printmatchpathcon(argv[i], 0);
 +					freecon(con);
 +				} else {
 +					printf("actual context unknown: %s, should be ", strerror(errno));
-+					printmatchpathcon(argv[i], 0);
++					error += printmatchpathcon(argv[i], 0);
 +				}
 +			}
 +		} else {
-+			printmatchpathcon(argv[i], header);
++			error += printmatchpathcon(argv[i], header);
 +		}
  	}
  	matchpathcon_fini();
- 	return 0;
+-	return 0;
++	return error;
+ }


Index: libselinux.spec
===================================================================
RCS file: /cvs/dist/rpms/libselinux/devel/libselinux.spec,v
retrieving revision 1.205
retrieving revision 1.206
diff -u -r1.205 -r1.206
--- libselinux.spec	20 Jun 2006 20:30:59 -0000	1.205
+++ libselinux.spec	21 Jun 2006 13:12:11 -0000	1.206
@@ -2,7 +2,7 @@
 Summary: SELinux library and simple utilities
 Name: libselinux
 Version: 1.30.15
-Release: 2
+Release: 3
 License: Public domain (uncopyrighted)
 Group: System Environment/Libraries
 Source: http://www.nsa.gov/selinux/archives/%{name}-%{version}.tgz
@@ -117,6 +117,9 @@
 %{_libdir}/python*/site-packages/selinux.py*
 
 %changelog
+* Wed Jun 21 2006 Dan Walsh <dwalsh redhat com> 1.30.15-3
+- Fix error reporting of matchpathcon
+
 * Mon Jun 19 2006 Dan Walsh <dwalsh redhat com> 1.30.15-2
 - Add function to compare file context on disk versus contexts in file_contexts file.
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]