df5eceb
diff --exclude-from=exclude --exclude=sepolgen-1.0.8 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/audit2allow/Makefile policycoreutils-2.0.22/audit2allow/Makefile
e0e7eda
--- nsapolicycoreutils/audit2allow/Makefile	2007-07-16 14:20:41.000000000 -0400
18e5e75
+++ policycoreutils-2.0.22/audit2allow/Makefile	2007-07-20 12:07:46.000000000 -0400
64fb16a
@@ -1,6 +1,7 @@
bb82af0
 # Installation directories.
bb82af0
 PREFIX ?= ${DESTDIR}/usr
64fb16a
 BINDIR ?= $(PREFIX)/bin
64fb16a
+SBINDIR ?= $(PREFIX)/sbin
bb82af0
 LIBDIR ?= $(PREFIX)/lib
bb82af0
 MANDIR ?= $(PREFIX)/share/man
bb82af0
 LOCALEDIR ?= /usr/share/locale
64fb16a
@@ -10,7 +11,7 @@
64fb16a
 install: all
64fb16a
 	-mkdir -p $(BINDIR)
64fb16a
 	install -m 755 audit2allow $(BINDIR)
64fb16a
-	install -m 755 sepolgen-ifgen $(BINDIR)
64fb16a
+	install -m 755 sepolgen-ifgen $(SBINDIR)
64fb16a
 	-mkdir -p $(MANDIR)/man1
64fb16a
 	install -m 644 audit2allow.1 $(MANDIR)/man1/
64fb16a
 
df5eceb
diff --exclude-from=exclude --exclude=sepolgen-1.0.8 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/Makefile policycoreutils-2.0.22/Makefile
e0e7eda
--- nsapolicycoreutils/Makefile	2007-07-16 14:20:43.000000000 -0400
18e5e75
+++ policycoreutils-2.0.22/Makefile	2007-07-20 12:07:46.000000000 -0400
e568e7a
@@ -1,4 +1,4 @@
6f8d769
-SUBDIRS=setfiles semanage load_policy newrole run_init restorecond secon audit2allow audit2why scripts sestatus semodule_package semodule semodule_link semodule_expand semodule_deps setsebool po
6f8d769
+SUBDIRS=setfiles semanage load_policy newrole run_init restorecond secon audit2allow audit2why scripts sestatus semodule_package semodule semodule_link semodule_expand semodule_deps setsebool po gui
e568e7a
 
e568e7a
 all install relabel clean indent:
e568e7a
 	@for subdir in $(SUBDIRS); do \
e0e7eda
diff --exclude-from=exclude --exclude=sepolgen-1.0.8 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/restorecond/Makefile policycoreutils-2.0.22/restorecond/Makefile
e0e7eda
--- nsapolicycoreutils/restorecond/Makefile	2007-07-16 14:20:41.000000000 -0400
18e5e75
+++ policycoreutils-2.0.22/restorecond/Makefile	2007-07-20 12:07:46.000000000 -0400
e0e7eda
@@ -22,7 +22,7 @@
e0e7eda
 	-mkdir -p $(INITDIR)
e0e7eda
 	install -m 644 restorecond.init $(INITDIR)/restorecond
e0e7eda
 	-mkdir -p $(SELINUXDIR)
e0e7eda
-	install -m 600 restorecond.conf $(SELINUXDIR)/restorecond.conf
e0e7eda
+	install -m 644 restorecond.conf $(SELINUXDIR)/restorecond.conf
e0e7eda
 
e0e7eda
 relabel: install
e0e7eda
 	/sbin/restorecon $(SBINDIR)/restorecond 
df5eceb
diff --exclude-from=exclude --exclude=sepolgen-1.0.8 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/restorecond/restorecond.c policycoreutils-2.0.22/restorecond/restorecond.c
e0e7eda
--- nsapolicycoreutils/restorecond/restorecond.c	2007-07-16 14:20:41.000000000 -0400
18e5e75
+++ policycoreutils-2.0.22/restorecond/restorecond.c	2007-07-20 12:07:46.000000000 -0400
9ac2144
@@ -210,9 +210,10 @@
9ac2144
 			}
9ac2144
 
9ac2144
 			if (fsetfilecon(fd, scontext) < 0) {
9ac2144
-				syslog(LOG_ERR,
9ac2144
-				       "set context %s->%s failed:'%s'\n",
9ac2144
-				       filename, scontext, strerror(errno));
9ac2144
+				if (errno != EOPNOTSUPP) 
9ac2144
+					syslog(LOG_ERR,
9ac2144
+					       "set context %s->%s failed:'%s'\n",
9ac2144
+					       filename, scontext, strerror(errno));
9ac2144
 				if (retcontext >= 0)
9ac2144
 					free(prev_context);
9ac2144
 				free(scontext);
9ac2144
@@ -225,8 +226,9 @@
9ac2144
 		if (retcontext >= 0)
9ac2144
 			free(prev_context);
9ac2144
 	} else {
9ac2144
-		syslog(LOG_ERR, "get context on %s failed: '%s'\n",
9ac2144
-		       filename, strerror(errno));
9ac2144
+		if (errno != EOPNOTSUPP) 
9ac2144
+			syslog(LOG_ERR, "get context on %s failed: '%s'\n",
9ac2144
+			       filename, strerror(errno));
9ac2144
 	}
9ac2144
 	free(scontext);
9ac2144
 	close(fd);
e0e7eda
diff --exclude-from=exclude --exclude=sepolgen-1.0.8 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/run_init/Makefile policycoreutils-2.0.22/run_init/Makefile
e0e7eda
--- nsapolicycoreutils/run_init/Makefile	2007-07-16 14:20:41.000000000 -0400
18e5e75
+++ policycoreutils-2.0.22/run_init/Makefile	2007-07-20 12:07:46.000000000 -0400
e0e7eda
@@ -34,8 +34,8 @@
e0e7eda
 install: all
e0e7eda
 	test -d $(SBINDIR)      || install -m 755 -d $(SBINDIR)
e0e7eda
 	test -d $(MANDIR)/man1 || install -m 755 -d $(MANDIR)/man1
e0e7eda
-	install -m 555 run_init $(SBINDIR)
e0e7eda
-	install -m 555 open_init_pty $(SBINDIR)
e0e7eda
+	install -m 755 run_init $(SBINDIR)
e0e7eda
+	install -m 755 open_init_pty $(SBINDIR)
e0e7eda
 	install -m 644 run_init.8 $(MANDIR)/man8/
e0e7eda
 	install -m 644 open_init_pty.8 $(MANDIR)/man8/
e0e7eda
 ifeq (${PAMH}, /usr/include/security/pam_appl.h)
df5eceb
diff --exclude-from=exclude --exclude=sepolgen-1.0.8 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/scripts/chcat policycoreutils-2.0.22/scripts/chcat
e0e7eda
--- nsapolicycoreutils/scripts/chcat	2007-07-16 14:20:41.000000000 -0400
18e5e75
+++ policycoreutils-2.0.22/scripts/chcat	2007-07-20 12:07:46.000000000 -0400
df5eceb
@@ -77,7 +77,7 @@
df5eceb
             
df5eceb
         if len(cats) > 0:
df5eceb
             new_serange = "%s-%s:%s" % (serange[0], top[0], ",".join(cats))
df5eceb
-        else
df5eceb
+        else:
df5eceb
             new_serange = "%s-%s" % (serange[0], top[0])
df5eceb
             
df5eceb
         if add_ind:
df5eceb
@@ -155,7 +155,7 @@
df5eceb
 
df5eceb
         if len(cats) > 0:
df5eceb
             new_serange = "%s-%s:%s" % (serange[0], top[0], ",".join(cats))
df5eceb
-        else
df5eceb
+        else:
df5eceb
             new_serange = "%s-%s" % (serange[0], top[0])
df5eceb
             
df5eceb
         if add_ind:
18e5e75
diff --exclude-from=exclude --exclude=sepolgen-1.0.8 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/scripts/fixfiles policycoreutils-2.0.22/scripts/fixfiles
18e5e75
--- nsapolicycoreutils/scripts/fixfiles	2007-07-16 14:20:41.000000000 -0400
18e5e75
+++ policycoreutils-2.0.22/scripts/fixfiles	2007-07-23 10:25:32.000000000 -0400
18e5e75
@@ -108,6 +108,7 @@
18e5e75
 
18e5e75
 rpmlist() {
18e5e75
 rpm -q --qf '[%{FILESTATES} %{FILENAMES}\n]' "$1" | grep '^0 ' | cut -f2- -d ' '
18e5e75
+[ ${PIPESTATUS[0]} != 0 ] && echo "$1 not found" >/dev/stderr
18e5e75
 }
18e5e75
 
18e5e75
 # 
9c2c4da
diff --exclude-from=exclude --exclude=sepolgen-1.0.8 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/scripts/genhomedircon policycoreutils-2.0.22/scripts/genhomedircon
e0e7eda
--- nsapolicycoreutils/scripts/genhomedircon	2007-07-16 14:20:41.000000000 -0400
18e5e75
+++ policycoreutils-2.0.22/scripts/genhomedircon	2007-07-20 12:07:46.000000000 -0400
9c2c4da
@@ -302,7 +302,7 @@
9c2c4da
 			    
9c2c4da
 			    regex = re.sub("\(\/\.\*\)\?", "", regex)
9c2c4da
 			    regex = regex + "/*$"
9c2c4da
-			    if re.search(regex,home, 0):
9c2c4da
+			    if re.match(regex,home):
9c2c4da
 				    return 1
9c2c4da
 		    except:
9c2c4da
 			    continue
df5eceb
diff --exclude-from=exclude --exclude=sepolgen-1.0.8 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/semanage/semanage policycoreutils-2.0.22/semanage/semanage
e0e7eda
--- nsapolicycoreutils/semanage/semanage	2007-07-16 14:20:41.000000000 -0400
18e5e75
+++ policycoreutils-2.0.22/semanage/semanage	2007-07-20 12:07:46.000000000 -0400
4efe23c
@@ -34,7 +34,10 @@
4efe23c
 sys.stdout = codecs.getwriter(locale.getpreferredencoding())(sys.__stdout__, 'replace')
4efe23c
 
4efe23c
 try:
4efe23c
-       gettext.install(PROGNAME, localedir="/usr/share/locale", unicode=1)
4efe23c
+       gettext.install(PROGNAME,
4efe23c
+                       localedir="/usr/share/locale",
4efe23c
+                       unicode=False,
4efe23c
+                       codeset = 'utf-8')
4efe23c
 except IOError:
4efe23c
        import __builtin__
4efe23c
        __builtin__.__dict__['_'] = unicode
df5eceb
diff --exclude-from=exclude --exclude=sepolgen-1.0.8 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/semanage/seobject.py policycoreutils-2.0.22/semanage/seobject.py
e0e7eda
--- nsapolicycoreutils/semanage/seobject.py	2007-07-16 14:20:41.000000000 -0400
18e5e75
+++ policycoreutils-2.0.22/semanage/seobject.py	2007-07-20 12:07:46.000000000 -0400
64fb16a
@@ -210,6 +210,7 @@
73f3144
 		os.write(fd, self.out())
73f3144
 		os.close(fd)
73f3144
 		os.rename(newfilename, self.filename)
73f3144
+                os.system("/sbin/service mcstrans reload > /dev/null")
1e9f6c8
                 
73f3144
 class semanageRecords:
73f3144
 	def __init__(self):
64fb16a
@@ -1283,9 +1284,12 @@
7e97034
 			raise ValueError(_("Could not list booleans"))
7e97034
 
7e97034
 		for boolean in self.blist:
7e97034
-			name = semanage_bool_get_name(boolean)
7e97034
-			value = semanage_bool_get_value(boolean)
7e97034
-			ddict[name] = value
7e97034
+                       value = []
7e97034
+                       name = semanage_bool_get_name(boolean)
7e97034
+                       value[0] = semanage_bool_get_value(boolean)
7e97034
+                       value[1] = selinux.security_get_boolean_pending(boolean)
7e97034
+                       value[2] = selinux.security_get_boolean_active(boolean)
7e97034
+                       ddict[name] = value
7e97034
 
7e97034
 		return ddict
7e97034