rpms/policycoreutils/devel .cvsignore, 1.203, 1.204 policycoreutils-rhat.patch, 1.452, 1.453 policycoreutils.spec, 1.656, 1.657 sources, 1.212, 1.213

Daniel J Walsh dwalsh at fedoraproject.org
Mon Nov 9 21:12:59 UTC 2009


Author: dwalsh

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

Modified Files:
	.cvsignore policycoreutils-rhat.patch policycoreutils.spec 
	sources 
Log Message:
* Tue Nov 2 2009 Dan Walsh <dwalsh at redhat.com> 2.0.75-1
- Update to upstream
	* Factor out restoring logic from setfiles.c into restore.c



Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/policycoreutils/devel/.cvsignore,v
retrieving revision 1.203
retrieving revision 1.204
diff -u -p -r1.203 -r1.204
--- .cvsignore	17 Sep 2009 13:07:45 -0000	1.203
+++ .cvsignore	9 Nov 2009 21:12:58 -0000	1.204
@@ -208,3 +208,4 @@ policycoreutils-2.0.71.tgz
 sepolgen-1.0.17.tgz
 policycoreutils-2.0.73.tgz
 policycoreutils-2.0.74.tgz
+policycoreutils-2.0.75.tgz

policycoreutils-rhat.patch:
 Makefile                                    |    2 
 audit2allow/audit2allow                     |   14 
 load_policy/Makefile                        |    5 
 restorecond/Makefile                        |   24 +
 restorecond/org.selinux.Restorecond.service |    3 
 restorecond/restorecond.8                   |   15 
 restorecond/restorecond.c                   |  427 ++++---------------------
 restorecond/restorecond.conf                |    5 
 restorecond/restorecond.desktop             |    7 
 restorecond/restorecond.h                   |   18 -
 restorecond/restorecond.init                |    5 
 restorecond/restorecond_user.conf           |    2 
 restorecond/user.c                          |  237 ++++++++++++++
 restorecond/watch.c                         |  253 +++++++++++++++
 sandbox/Makefile                            |   31 +
 sandbox/deliverables/README                 |   32 +
 sandbox/deliverables/basicwrapper           |    4 
 sandbox/deliverables/run-in-sandbox.py      |   49 ++
 sandbox/deliverables/sandbox                |  216 ++++++++++++
 sandbox/sandbox                             |  242 ++++++++++++++
 sandbox/sandbox.8                           |   26 +
 sandbox/sandboxX.sh                         |   16 
 sandbox/seunshare.c                         |  265 +++++++++++++++
 scripts/Makefile                            |    2 
 scripts/chcat                               |    2 
 scripts/fixfiles                            |   28 -
 scripts/fixfiles.8                          |   17 -
 semanage/semanage                           |  136 +++++---
 semanage/seobject.py                        |  467 ++++++++++++++++++----------
 semodule/semodule.8                         |    6 
 semodule/semodule.c                         |   53 ++-
 setfiles/restore.c                          |    6 
 setfiles/restorecon.8                       |    7 
 setfiles/setfiles.8                         |    3 
 setfiles/setfiles.c                         |    6 
 35 files changed, 2031 insertions(+), 600 deletions(-)

View full diff with command:
/usr/bin/cvs -n -f diff -kk -u -p -N -r 1.452 -r 1.453 policycoreutils-rhat.patchIndex: policycoreutils-rhat.patch
===================================================================
RCS file: /cvs/extras/rpms/policycoreutils/devel/policycoreutils-rhat.patch,v
retrieving revision 1.452
retrieving revision 1.453
diff -u -p -r1.452 -r1.453
--- policycoreutils-rhat.patch	2 Nov 2009 16:40:00 -0000	1.452
+++ policycoreutils-rhat.patch	9 Nov 2009 21:12:58 -0000	1.453
@@ -1,6 +1,6 @@
-diff --exclude-from=exclude --exclude=sepolgen-1.0.17 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/audit2allow/audit2allow policycoreutils-2.0.74/audit2allow/audit2allow
+diff --exclude-from=exclude --exclude=sepolgen-1.0.17 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/audit2allow/audit2allow policycoreutils-2.0.75/audit2allow/audit2allow
 --- nsapolicycoreutils/audit2allow/audit2allow	2009-01-13 08:45:35.000000000 -0500
-+++ policycoreutils-2.0.74/audit2allow/audit2allow	2009-10-15 10:37:41.000000000 -0400
++++ policycoreutils-2.0.75/audit2allow/audit2allow	2009-11-03 09:44:56.000000000 -0500
 @@ -42,6 +42,8 @@
          from optparse import OptionParser
  
@@ -38,9 +38,9 @@ diff --exclude-from=exclude --exclude=se
          else:
              # This is the default if no input is specified
              f = sys.stdin
-diff --exclude-from=exclude --exclude=sepolgen-1.0.17 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/load_policy/Makefile policycoreutils-2.0.74/load_policy/Makefile
+diff --exclude-from=exclude --exclude=sepolgen-1.0.17 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/load_policy/Makefile policycoreutils-2.0.75/load_policy/Makefile
 --- nsapolicycoreutils/load_policy/Makefile	2008-08-28 09:34:24.000000000 -0400
-+++ policycoreutils-2.0.74/load_policy/Makefile	2009-10-15 10:37:41.000000000 -0400
++++ policycoreutils-2.0.75/load_policy/Makefile	2009-11-03 09:44:56.000000000 -0500
 @@ -1,6 +1,7 @@
  # Installation directories.
  PREFIX ?= ${DESTDIR}/usr
@@ -59,18 +59,18 @@ diff --exclude-from=exclude --exclude=se
  
  clean:
  	-rm -f $(TARGETS) *.o 
-diff --exclude-from=exclude --exclude=sepolgen-1.0.17 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/Makefile policycoreutils-2.0.74/Makefile
+diff --exclude-from=exclude --exclude=sepolgen-1.0.17 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/Makefile policycoreutils-2.0.75/Makefile
 --- nsapolicycoreutils/Makefile	2008-08-28 09:34:24.000000000 -0400
-+++ policycoreutils-2.0.74/Makefile	2009-10-15 10:37:41.000000000 -0400
++++ policycoreutils-2.0.75/Makefile	2009-11-03 09:44:56.000000000 -0500
 @@ -1,4 +1,4 @@
 -SUBDIRS = setfiles semanage load_policy newrole run_init secon audit2allow audit2why scripts sestatus semodule_package semodule semodule_link semodule_expand semodule_deps setsebool po
 +SUBDIRS = setfiles semanage load_policy newrole run_init sandbox secon audit2allow audit2why scripts sestatus semodule_package semodule semodule_link semodule_expand semodule_deps setsebool po gui
  
  INOTIFYH = $(shell ls /usr/include/sys/inotify.h 2>/dev/null)
  
-diff --exclude-from=exclude --exclude=sepolgen-1.0.17 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/restorecond/Makefile policycoreutils-2.0.74/restorecond/Makefile
+diff --exclude-from=exclude --exclude=sepolgen-1.0.17 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/restorecond/Makefile policycoreutils-2.0.75/restorecond/Makefile
 --- nsapolicycoreutils/restorecond/Makefile	2009-08-20 15:49:21.000000000 -0400
-+++ policycoreutils-2.0.74/restorecond/Makefile	2009-10-15 10:37:41.000000000 -0400
++++ policycoreutils-2.0.75/restorecond/Makefile	2009-11-03 09:44:56.000000000 -0500
 @@ -1,17 +1,28 @@
  # Installation directories.
  PREFIX ?= ${DESTDIR}/usr
@@ -117,16 +117,16 @@ diff --exclude-from=exclude --exclude=se
  
  relabel: install
  	/sbin/restorecon $(SBINDIR)/restorecond 
-diff --exclude-from=exclude --exclude=sepolgen-1.0.17 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/restorecond/org.selinux.Restorecond.service policycoreutils-2.0.74/restorecond/org.selinux.Restorecond.service
+diff --exclude-from=exclude --exclude=sepolgen-1.0.17 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/restorecond/org.selinux.Restorecond.service policycoreutils-2.0.75/restorecond/org.selinux.Restorecond.service
 --- nsapolicycoreutils/restorecond/org.selinux.Restorecond.service	1969-12-31 19:00:00.000000000 -0500
-+++ policycoreutils-2.0.74/restorecond/org.selinux.Restorecond.service	2009-10-15 10:37:41.000000000 -0400
++++ policycoreutils-2.0.75/restorecond/org.selinux.Restorecond.service	2009-11-03 09:44:56.000000000 -0500
 @@ -0,0 +1,3 @@
 +[D-BUS Service]
 +Name=org.selinux.Restorecond
 +Exec=/usr/sbin/restorecond -u
-diff --exclude-from=exclude --exclude=sepolgen-1.0.17 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/restorecond/restorecond.8 policycoreutils-2.0.74/restorecond/restorecond.8
+diff --exclude-from=exclude --exclude=sepolgen-1.0.17 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/restorecond/restorecond.8 policycoreutils-2.0.75/restorecond/restorecond.8
 --- nsapolicycoreutils/restorecond/restorecond.8	2009-08-20 15:49:21.000000000 -0400
-+++ policycoreutils-2.0.74/restorecond/restorecond.8	2009-10-20 09:32:14.000000000 -0400
++++ policycoreutils-2.0.75/restorecond/restorecond.8	2009-11-03 09:44:56.000000000 -0500
 @@ -3,7 +3,7 @@
  restorecond \- daemon that watches for file creation and then sets the default SELinux file context
  
@@ -161,9 +161,9 @@ diff --exclude-from=exclude --exclude=se
  
  .SH "SEE ALSO"
  .BR restorecon (8),
-diff --exclude-from=exclude --exclude=sepolgen-1.0.17 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/restorecond/restorecond.c policycoreutils-2.0.74/restorecond/restorecond.c
+diff --exclude-from=exclude --exclude=sepolgen-1.0.17 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/restorecond/restorecond.c policycoreutils-2.0.75/restorecond/restorecond.c
 --- nsapolicycoreutils/restorecond/restorecond.c	2009-08-20 15:49:21.000000000 -0400
-+++ policycoreutils-2.0.74/restorecond/restorecond.c	2009-10-20 09:29:06.000000000 -0400
++++ policycoreutils-2.0.75/restorecond/restorecond.c	2009-11-03 09:47:48.000000000 -0500
 @@ -30,9 +30,11 @@
   * and makes sure that there security context matches the systems defaults
   *
@@ -501,7 +501,7 @@ diff --exclude-from=exclude --exclude=se
  	exit(0);
  }
  
-@@ -390,74 +136,33 @@
+@@ -390,74 +136,34 @@
     to see if it is one that we are watching.
  */
  
@@ -588,6 +588,7 @@ diff --exclude-from=exclude --exclude=se
 +	r_opts.hard_links = 0;
 +	r_opts.abort_on_error = 0;
 +	r_opts.add_assoc = 0;
++	r_opts.expand_realpath = 0;
 +	r_opts.fts_flags = FTS_PHYSICAL;
 +	r_opts.selabel_opt_validate = NULL;
 +	r_opts.selabel_opt_path = NULL;
@@ -598,7 +599,7 @@ diff --exclude-from=exclude --exclude=se
  
  	/* Register sighandlers */
  	sa.sa_flags = 0;
-@@ -467,38 +172,59 @@
+@@ -467,38 +173,59 @@
  
  	set_matchpathcon_flags(MATCHPATHCON_NOTRANS);
  
@@ -667,9 +668,9 @@ diff --exclude-from=exclude --exclude=se
  }
 +
 +
-diff --exclude-from=exclude --exclude=sepolgen-1.0.17 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/restorecond/restorecond.conf policycoreutils-2.0.74/restorecond/restorecond.conf
+diff --exclude-from=exclude --exclude=sepolgen-1.0.17 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/restorecond/restorecond.conf policycoreutils-2.0.75/restorecond/restorecond.conf
 --- nsapolicycoreutils/restorecond/restorecond.conf	2009-08-20 15:49:21.000000000 -0400
-+++ policycoreutils-2.0.74/restorecond/restorecond.conf	2009-10-15 10:37:41.000000000 -0400
++++ policycoreutils-2.0.75/restorecond/restorecond.conf	2009-11-03 09:44:56.000000000 -0500
 @@ -4,8 +4,5 @@
  /etc/mtab
  /var/run/utmp
@@ -680,9 +681,9 @@ diff --exclude-from=exclude --exclude=se
  /root/.ssh/*
 -
 -
-diff --exclude-from=exclude --exclude=sepolgen-1.0.17 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/restorecond/restorecond.desktop policycoreutils-2.0.74/restorecond/restorecond.desktop
+diff --exclude-from=exclude --exclude=sepolgen-1.0.17 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/restorecond/restorecond.desktop policycoreutils-2.0.75/restorecond/restorecond.desktop
 --- nsapolicycoreutils/restorecond/restorecond.desktop	1969-12-31 19:00:00.000000000 -0500
-+++ policycoreutils-2.0.74/restorecond/restorecond.desktop	2009-10-15 10:37:41.000000000 -0400
++++ policycoreutils-2.0.75/restorecond/restorecond.desktop	2009-11-03 09:44:56.000000000 -0500
 @@ -0,0 +1,7 @@
 +[Desktop Entry]
 +Name=File Context maintainer
@@ -691,9 +692,9 @@ diff --exclude-from=exclude --exclude=se
 +Encoding=UTF-8
 +Type=Application
 +StartupNotify=false
-diff --exclude-from=exclude --exclude=sepolgen-1.0.17 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/restorecond/restorecond.h policycoreutils-2.0.74/restorecond/restorecond.h
+diff --exclude-from=exclude --exclude=sepolgen-1.0.17 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/restorecond/restorecond.h policycoreutils-2.0.75/restorecond/restorecond.h
 --- nsapolicycoreutils/restorecond/restorecond.h	2009-08-20 15:49:21.000000000 -0400
-+++ policycoreutils-2.0.74/restorecond/restorecond.h	2009-10-15 10:37:41.000000000 -0400
++++ policycoreutils-2.0.75/restorecond/restorecond.h	2009-11-03 09:44:56.000000000 -0500
 @@ -24,7 +24,21 @@
  #ifndef RESTORED_CONFIG_H
  #define RESTORED_CONFIG_H
@@ -718,9 +719,9 @@ diff --exclude-from=exclude --exclude=se
 +extern void watch_list_free(int fd);
  
  #endif
-diff --exclude-from=exclude --exclude=sepolgen-1.0.17 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/restorecond/restorecond.init policycoreutils-2.0.74/restorecond/restorecond.init
+diff --exclude-from=exclude --exclude=sepolgen-1.0.17 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/restorecond/restorecond.init policycoreutils-2.0.75/restorecond/restorecond.init
 --- nsapolicycoreutils/restorecond/restorecond.init	2009-08-20 15:49:21.000000000 -0400
-+++ policycoreutils-2.0.74/restorecond/restorecond.init	2009-10-15 10:37:41.000000000 -0400
++++ policycoreutils-2.0.75/restorecond/restorecond.init	2009-11-03 09:44:56.000000000 -0500
 @@ -75,16 +75,15 @@
  	status restorecond
  	RETVAL=$?
@@ -740,15 +741,15 @@ diff --exclude-from=exclude --exclude=se
  
  exit $RETVAL
 -
-diff --exclude-from=exclude --exclude=sepolgen-1.0.17 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/restorecond/restorecond_user.conf policycoreutils-2.0.74/restorecond/restorecond_user.conf
+diff --exclude-from=exclude --exclude=sepolgen-1.0.17 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/restorecond/restorecond_user.conf policycoreutils-2.0.75/restorecond/restorecond_user.conf
 --- nsapolicycoreutils/restorecond/restorecond_user.conf	1969-12-31 19:00:00.000000000 -0500
-+++ policycoreutils-2.0.74/restorecond/restorecond_user.conf	2009-10-15 10:37:41.000000000 -0400
++++ policycoreutils-2.0.75/restorecond/restorecond_user.conf	2009-11-03 09:44:56.000000000 -0500
 @@ -0,0 +1,2 @@
 +~/*
 +~/public_html/*
-diff --exclude-from=exclude --exclude=sepolgen-1.0.17 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/restorecond/user.c policycoreutils-2.0.74/restorecond/user.c
+diff --exclude-from=exclude --exclude=sepolgen-1.0.17 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/restorecond/user.c policycoreutils-2.0.75/restorecond/user.c
 --- nsapolicycoreutils/restorecond/user.c	1969-12-31 19:00:00.000000000 -0500
-+++ policycoreutils-2.0.74/restorecond/user.c	2009-10-15 10:37:41.000000000 -0400
++++ policycoreutils-2.0.75/restorecond/user.c	2009-11-03 09:44:56.000000000 -0500
 @@ -0,0 +1,237 @@
 +/*
 + * restorecond
@@ -987,9 +988,9 @@ diff --exclude-from=exclude --exclude=se
 +    return 0;
 +}
 +
-diff --exclude-from=exclude --exclude=sepolgen-1.0.17 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/restorecond/watch.c policycoreutils-2.0.74/restorecond/watch.c
+diff --exclude-from=exclude --exclude=sepolgen-1.0.17 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/restorecond/watch.c policycoreutils-2.0.75/restorecond/watch.c
 --- nsapolicycoreutils/restorecond/watch.c	1969-12-31 19:00:00.000000000 -0500
-+++ policycoreutils-2.0.74/restorecond/watch.c	2009-10-15 10:37:41.000000000 -0400
++++ policycoreutils-2.0.75/restorecond/watch.c	2009-11-03 09:46:05.000000000 -0500
 @@ -0,0 +1,253 @@
 +#define _GNU_SOURCE
 +#include <sys/inotify.h>
@@ -1049,8 +1050,8 @@ diff --exclude-from=exclude --exclude=se
 +		  int len = strlen(globbuf.gl_pathv[i]) -2;
 +		  if (len > 0 && strcmp(&globbuf.gl_pathv[i][len--], "/.") == 0) continue;
 +		  if (len > 0 && strcmp(&globbuf.gl_pathv[i][len], "/..") == 0) continue;
-+		  if (process_one(globbuf.gl_pathv[i], 0) > 0)
-+		    process_one(globbuf.gl_pathv[i], 1);
++		  if (process_one_realpath(globbuf.gl_pathv[i], 0) > 0)
++			  process_one_realpath(globbuf.gl_pathv[i], 1);
 +		}
[...1678 lines suppressed...]
-+	r_opts.progname = strdup(argv[0]);
-+	if (!r_opts.progname) {
- 		fprintf(stderr, "%s:  Out of memory!\n", argv[0]);
- 		exit(1);
- 	}
--	base = basename(progname);
-+	base = basename(r_opts.progname);
- 	
- 	if (!strcmp(base, SETFILES)) {
- 		/* 
-@@ -832,28 +338,28 @@
- 		iamrestorecon = 0;
- 		recurse = 1;
- 		expand_realpath = 0;
--		abort_on_error = 1;
--		add_assoc = 1;
--		fts_flags = FTS_PHYSICAL | FTS_XDEV;
-+		r_opts.abort_on_error = 1;
-+		r_opts.add_assoc = 1;
-+		r_opts.fts_flags = FTS_PHYSICAL | FTS_XDEV;
- 		ctx_validate = 1;
- 	} else {
- 		/*
- 		 * restorecon:  
- 		 * No recursive descent unless -r/-R,
--		 * Expands paths via realpath, 
- 		 * Do not abort on errors during the file tree walk,
-+		 * Expands paths via realpath, 
- 		 * Do not try to track inode associations for conflict detection,
- 		 * Follows mounts,
- 		 * Does lazy validation of contexts upon use. 
- 		 */
--		if (strcmp(base, RESTORECON) && !quiet) 
-+		if (strcmp(base, RESTORECON) && !r_opts.quiet) 
- 			printf("Executed with an unrecognized name (%s), defaulting to %s behavior.\n", base, RESTORECON);
- 		iamrestorecon = 1;
- 		recurse = 0;
- 		expand_realpath = 1;
--		abort_on_error = 0;
--		add_assoc = 0;
--		fts_flags = FTS_PHYSICAL;
-+		r_opts.abort_on_error = 0;
-+		r_opts.add_assoc = 0;
-+		r_opts.fts_flags = FTS_PHYSICAL;
- 		ctx_validate = 0;
- 
- 		/* restorecon only:  silent exit if no SELinux.
-@@ -915,37 +421,37 @@
- 			input_filename = optarg;
- 			break;			
- 		case 'd':
--			debug = 1;
-+			r_opts.debug = 1;
- 			break;
- 		case 'i':
- 			ignore_enoent = 1;
- 			break;
- 		case 'l':
--			logging = 1;
-+			r_opts.logging = 1;
- 			break;
- 		case 'F':
--			force = 1;
-+			r_opts.force = 1;
- 			break;
- 		case 'n':
--			change = 0;
-+			r_opts.change = 0;
- 			break;
- 		case 'o':
- 			if (strcmp(optarg, "-") == 0) {
--				outfile = stdout;
-+				r_opts.outfile = stdout;
+@@ -371,7 +371,7 @@
  				break;
  			}
- 
--			outfile = fopen(optarg, "w");
--			if (!outfile) {
-+			r_opts.outfile = fopen(optarg, "w");
-+			if (!r_opts.outfile) {
- 				fprintf(stderr, "Error opening %s: %s\n",
- 					optarg, strerror(errno));
- 
- 				usage(argv[0]);
- 			}
--			__fsetlocking(outfile, FSETLOCKING_BYCALLER);
-+			__fsetlocking(r_opts.outfile, FSETLOCKING_BYCALLER);
- 			break;
- 		case 'q':
--			quiet = 1;
-+			r_opts.quiet = 1;
- 			break;
- 		case 'R':
- 		case 'r':
-@@ -958,7 +464,7 @@
+ 			if (optind + 1 >= argc) {
+-				fprintf(stderr, "usage:  %s -r r_opts.rootpath\n",
++				fprintf(stderr, "usage:  %s -r rootpath\n",
  					argv[0]);
  				exit(1);
  			}
--			if (NULL != rootpath) {
-+			if (NULL != r_opts.rootpath) {
- 				fprintf(stderr,
- 					"%s: only one -r can be specified\n",
- 					argv[0]);
-@@ -969,23 +475,23 @@
- 		case 's':
- 			use_input_file = 1;
- 			input_filename = "-";
--			add_assoc = 0;
-+			r_opts.add_assoc = 0;
- 			break;
- 		case 'v':
--			if (progress) {
-+			if (r_opts.progress) {
- 				fprintf(stderr,
- 					"Progress and Verbose mutually exclusive\n");
- 				exit(1);
- 			}
--			verbose++;
-+			r_opts.verbose++;
- 			break;
- 		case 'p':
--			if (verbose) {
-+			if (r_opts.verbose) {
- 				fprintf(stderr,
- 					"Progress and Verbose mutually exclusive\n");
- 				usage(argv[0]);
- 			}
--			progress = 1;
-+			r_opts.progress = 1;
- 			break;
- 		case 'W':
- 			warn_no_match = 1;
-@@ -1033,18 +539,13 @@
- 	}
- 
- 	/* Load the file contexts configuration and check it. */
--	opts[0].value = (ctx_validate ? (char*)1 : NULL);
--	opts[1].value = altpath;
--
--	hnd = selabel_open(SELABEL_CTX_FILE, opts, 2);
--	if (!hnd) {
--		perror(altpath);
--		exit(1);
--	}
-+	r_opts.selabel_opt_validate = (ctx_validate ? (char *)1 : NULL);
-+	r_opts.selabel_opt_path = altpath;
- 
- 	if (nerr)
- 		exit(1);
- 
-+	restore_init(&r_opts);
- 	if (use_input_file) {
- 		FILE *f = stdin;
- 		ssize_t len;
-@@ -1061,6 +562,9 @@
- 		delim = (null_terminated != 0) ? '\0' : '\n';
- 		while ((len = getdelim(&buf, &buf_len, delim, f)) > 0) {
- 			buf[len - 1] = 0;
-+			if (!strcmp(buf, "/"))
-+				mass_relabel = 1;
-+	
- 			errors |= process_one_realpath(buf);
- 		}
- 		if (strcmp(input_filename, "-") != 0)
-@@ -1070,22 +574,21 @@
- 			errors |= process_one_realpath(argv[i]);
- 		}
- 	}
--
-+	
-+	if (mass_relabel)
-+		mass_relabel_errs = errors;
- 	maybe_audit_mass_relabel();
- 
- 	if (warn_no_match)
--		selabel_stats(hnd);
-+		selabel_stats(r_opts.hnd);
- 
--	selabel_close(hnd);
-+	selabel_close(r_opts.hnd);
-+	restore_finish();
- 
--	if (outfile)
--		fclose(outfile);
--
--	for (i = 0; i < excludeCtr; i++) {
--		free(excludeArray[i].directory);
--	}
-+	if (r_opts.outfile)
-+		fclose(r_opts.outfile);
- 
--       if (progress && count >= STAR_COUNT)
-+       if (r_opts.progress && r_opts.count >= STAR_COUNT)
-                printf("\n");
- 	exit(errors);
- }


Index: policycoreutils.spec
===================================================================
RCS file: /cvs/extras/rpms/policycoreutils/devel/policycoreutils.spec,v
retrieving revision 1.656
retrieving revision 1.657
diff -u -p -r1.656 -r1.657
--- policycoreutils.spec	2 Nov 2009 16:40:03 -0000	1.656
+++ policycoreutils.spec	9 Nov 2009 21:12:59 -0000	1.657
@@ -5,8 +5,8 @@
 %define	sepolgenver	1.0.17
 Summary: SELinux policy core utilities
 Name:	 policycoreutils
-Version: 2.0.74
-Release: 15%{?dist}
+Version: 2.0.75
+Release: 1%{?dist}
 License: GPLv2+
 Group:	 System Environment/Base
 Source:	 http://www.nsa.gov/selinux/archives/policycoreutils-%{version}.tgz
@@ -296,6 +296,10 @@ fi
 exit 0
 
 %changelog
+* Tue Nov 2 2009 Dan Walsh <dwalsh at redhat.com> 2.0.75-1
+- Update to upstream
+	* Factor out restoring logic from setfiles.c into restore.c
+
 * Fri Oct 30 2009 Dan Walsh <dwalsh at redhat.com> 2.0.74-15
 - Fix typo in seobject.py
 


Index: sources
===================================================================
RCS file: /cvs/extras/rpms/policycoreutils/devel/sources,v
retrieving revision 1.212
retrieving revision 1.213
diff -u -p -r1.212 -r1.213
--- sources	17 Sep 2009 13:07:47 -0000	1.212
+++ sources	9 Nov 2009 21:12:59 -0000	1.213
@@ -1,3 +1,2 @@
 480cc64a050735fa1163a87dc89c4f49  sepolgen-1.0.17.tgz
-60aa41df668a557892296ff02c7411aa  policycoreutils-2.0.74.tgz
-59d33101d57378ce69889cc078addf90  policycoreutils_man_ru2.tar.bz2
+3798f448cdc084e535507f0eee209fc7  policycoreutils-2.0.75.tgz




More information about the fedora-extras-commits mailing list