rpms/policycoreutils/devel policycoreutils-rhat.patch, 1.400, 1.401 policycoreutils.spec, 1.570, 1.571

Daniel J Walsh dwalsh at fedoraproject.org
Fri Nov 7 15:01:08 UTC 2008


Author: dwalsh

Update of /cvs/extras/rpms/policycoreutils/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv12794

Modified Files:
	policycoreutils-rhat.patch policycoreutils.spec 
Log Message:
* Fri Nov 7 2008 Dan Walsh <dwalsh at redhat.com> 2.0.57-12
- add compression


policycoreutils-rhat.patch:

Index: policycoreutils-rhat.patch
===================================================================
RCS file: /cvs/extras/rpms/policycoreutils/devel/policycoreutils-rhat.patch,v
retrieving revision 1.400
retrieving revision 1.401
diff -u -r1.400 -r1.401
--- policycoreutils-rhat.patch	30 Oct 2008 18:23:59 -0000	1.400
+++ policycoreutils-rhat.patch	7 Nov 2008 15:01:06 -0000	1.401
@@ -56,6 +56,18 @@
  		return -1;
  	}
  	rc |= cap_set_flag(new_caps, CAP_PERMITTED, 6, cap_list, CAP_SET);
+diff --exclude-from=exclude --exclude=sepolgen-1.0.13 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/scripts/chcat policycoreutils-2.0.57/scripts/chcat
+--- nsapolicycoreutils/scripts/chcat	2008-08-28 09:34:24.000000000 -0400
++++ policycoreutils-2.0.57/scripts/chcat	2008-11-04 19:09:01.000000000 -0500
+@@ -291,6 +291,8 @@
+             for i in c.split(","):
+                 if i not in newcats:
+                     newcats.append(i)
++    if len(newcats) > 25:
++        return cats
+     return newcats
+ 
+ def translate(cats):
 diff --exclude-from=exclude --exclude=sepolgen-1.0.13 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/semanage/seobject.py policycoreutils-2.0.57/semanage/seobject.py
 --- nsapolicycoreutils/semanage/seobject.py	2008-09-12 11:48:15.000000000 -0400
 +++ policycoreutils-2.0.57/semanage/seobject.py	2008-10-28 15:48:14.000000000 -0400
@@ -151,3 +163,86 @@
  				
  class booleanRecords(semanageRecords):
  	def __init__(self, store = ""):
+diff --exclude-from=exclude --exclude=sepolgen-1.0.13 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/semodule/semodule.c policycoreutils-2.0.57/semodule/semodule.c
+--- nsapolicycoreutils/semodule/semodule.c	2008-08-28 09:34:24.000000000 -0400
++++ policycoreutils-2.0.57/semodule/semodule.c	2008-10-10 16:04:46.000000000 -0400
+@@ -60,24 +60,6 @@
+ 	free(commands);
+ }
+ 
+-/* mmap() a file to '*data', returning the total number of bytes in
+- * the file.  Returns 0 if file could not be opened or mapped. */
+-static size_t map_file(char *filename, char **data)
+-{
+-	int fd;
+-	struct stat sb;
+-	if ((fd = open(filename, O_RDONLY)) == -1) {
+-		return 0;
+-	}
+-	if (fstat(fd, &sb) == -1 ||
+-	    (*data = mmap(NULL, sb.st_size, PROT_READ, MAP_PRIVATE, fd, 0)) ==
+-	    MAP_FAILED) {
+-		sb.st_size = 0;
+-	}
+-	close(fd);
+-	return sb.st_size;
+-}
+-
+ /* Signal handlers. */
+ static void handle_signal(int sig_num)
+ {
+@@ -339,16 +321,6 @@
+ 	for (i = 0; i < num_commands; i++) {
+ 		enum client_modes mode = commands[i].mode;
+ 		char *mode_arg = commands[i].arg;
+-		char *data = NULL;
+-		size_t data_len = 0;
+-		if (mode == INSTALL_M || mode == UPGRADE_M || mode == BASE_M) {
+-			if ((data_len = map_file(mode_arg, &data)) == 0) {
+-				fprintf(stderr,
+-					"%s:  Could not read file '%s': %s\n",
+-					argv[0], mode_arg, errno ? strerror(errno) : "");
+-				goto cleanup;
+-			}
+-		}
+ 		switch (mode) {
+ 		case INSTALL_M:{
+ 				if (verbose) {
+@@ -357,7 +329,7 @@
+ 					     mode_arg);
+ 				}
+ 				result =
+-				    semanage_module_install(sh, data, data_len);
++				    semanage_module_install_file(sh, mode_arg);
+ 				break;
+ 			}
+ 		case UPGRADE_M:{
+@@ -367,7 +339,7 @@
+ 					     mode_arg);
+ 				}
+ 				result =
+-				    semanage_module_upgrade(sh, data, data_len);
++				    semanage_module_upgrade_file(sh, mode_arg);
+ 				break;
+ 			}
+ 		case BASE_M:{
+@@ -377,8 +349,7 @@
+ 					     mode_arg);
+ 				}
+ 				result =
+-				    semanage_module_install_base(sh, data,
+-								 data_len);
++				    semanage_module_install_base_file(sh, mode_arg);
+ 				break;
+ 			}
+ 		case REMOVE_M:{
+@@ -429,9 +400,6 @@
+ 			}
+ 		}
+ 		commit += do_commit[mode];
+-		if (mode == INSTALL_M || mode == UPGRADE_M || mode == BASE_M) {
+-			munmap(data, data_len);
+-		}
+ 		if (result < 0) {
+ 			fprintf(stderr, "%s:  Failed on %s!\n", argv[0],
+ 				mode_arg ? : "list");


Index: policycoreutils.spec
===================================================================
RCS file: /cvs/extras/rpms/policycoreutils/devel/policycoreutils.spec,v
retrieving revision 1.570
retrieving revision 1.571
diff -u -r1.570 -r1.571
--- policycoreutils.spec	4 Nov 2008 23:02:34 -0000	1.570
+++ policycoreutils.spec	7 Nov 2008 15:01:08 -0000	1.571
@@ -1,12 +1,12 @@
 %define	libauditver	1.4.2-1
 %define	libsepolver	2.0.19-1
-%define	libsemanagever	2.0.28-1
+%define	libsemanagever	2.0.28-2
 %define	libselinuxver	2.0.46-5
 %define	sepolgenver	1.0.13
 Summary: SELinux policy core utilities
 Name:	 policycoreutils
 Version: 2.0.57
-Release: 11%{?dist}
+Release: 12%{?dist}
 License: GPLv2+
 Group:	 System Environment/Base
 Source:	 http://www.nsa.gov/selinux/archives/policycoreutils-%{version}.tgz
@@ -192,6 +192,9 @@
 fi
 
 %changelog
+* Fri Nov 7 2008 Dan Walsh <dwalsh at redhat.com> 2.0.57-12
+- add compression
+
 * Tue Nov 04 2008 Jesse Keating <jkeating at redhat.com> - 2.0.57-11
 - Move the usermode-gtk requires to the -gui subpackage.
 




More information about the scm-commits mailing list