rpms/policycoreutils/devel policycoreutils-rhat.patch, 1.153, 1.154 policycoreutils.spec, 1.222, 1.223

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Thu Jan 19 22:25:28 UTC 2006


Author: dwalsh

Update of /cvs/dist/rpms/policycoreutils/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv1616

Modified Files:
	policycoreutils-rhat.patch policycoreutils.spec 
Log Message:
* Thu Jan 19 2006 Dan Walsh <dwalsh at redhat.com> 1.29.9-2
- Fix genhomedircon to work on MLS policy


policycoreutils-rhat.patch:
 chcat.8       |    5 +++++
 genhomedircon |   15 ++++++++-------
 2 files changed, 13 insertions(+), 7 deletions(-)

Index: policycoreutils-rhat.patch
===================================================================
RCS file: /cvs/dist/rpms/policycoreutils/devel/policycoreutils-rhat.patch,v
retrieving revision 1.153
retrieving revision 1.154
diff -u -r1.153 -r1.154
--- policycoreutils-rhat.patch	19 Jan 2006 21:14:38 -0000	1.153
+++ policycoreutils-rhat.patch	19 Jan 2006 22:25:24 -0000	1.154
@@ -1,6 +1,6 @@
-diff --exclude-from=exclude -N -u -r nsapolicycoreutils/scripts/chcat.8 policycoreutils-1.29.8/scripts/chcat.8
+diff --exclude-from=exclude -N -u -r nsapolicycoreutils/scripts/chcat.8 policycoreutils-1.29.9/scripts/chcat.8
 --- nsapolicycoreutils/scripts/chcat.8	2006-01-18 11:12:43.000000000 -0500
-+++ policycoreutils-1.29.8/scripts/chcat.8	2006-01-19 10:48:59.000000000 -0500
++++ policycoreutils-1.29.9/scripts/chcat.8	2006-01-19 17:23:42.000000000 -0500
 @@ -27,6 +27,11 @@
  Change/Remove the security CATEGORY for each FILE/USER.
  .PP
@@ -13,3 +13,57 @@
  .TP
  \fB\-d\fR
  delete the category from each FILE/USER.
+diff --exclude-from=exclude -N -u -r nsapolicycoreutils/scripts/genhomedircon policycoreutils-1.29.9/scripts/genhomedircon
+--- nsapolicycoreutils/scripts/genhomedircon	2006-01-18 11:12:43.000000000 -0500
++++ policycoreutils-1.29.9/scripts/genhomedircon	2006-01-19 17:23:54.000000000 -0500
+@@ -199,10 +199,11 @@
+ 				sys.stderr.write("The user \"%s\" is not present in the passwd file, skipping...\n" % user)
+ 				return
+ 		prefs = {}
++		prefs["seuser"] = seuser
+ 		prefs["role"] = role
+ 		prefs["home"] = home
+-		udict[seuser] = prefs
+-
++		udict[user] = prefs
++		
+ 	def getUsers(self):
+ 		udict = {}
+ 		if self.semanaged:
+@@ -233,14 +234,14 @@
+ 
+ 		return udict
+ 
+-	def getHomeDirContext(self, user, home, role):
++	def getHomeDirContext(self, user, seuser, home, role):
+ 		ret="\n\n#\n# Home Context for user %s\n#\n\n" % user
+ 		fd=open(self.getHomeDirTemplate(), 'r')
+ 		for i in  fd.read().split('\n'):
+ 			if i.startswith("HOME_DIR") == 1:
+ 				i=i.replace("HOME_DIR", home)
+ 				i=i.replace("ROLE", role)
+-				i=i.replace("system_u", user)
++				i=i.replace("system_u", seuser)
+ 				ret = ret+i+"\n"
+ 		fd.close()
+ 		return ret
+@@ -265,8 +266,8 @@
+ 		ret=""
+ 		# Fill in HOME and ROLE for users that are defined
+ 		for u in users.keys():
+-			ret += self.getHomeDirContext (u, users[u]["home"], users[u]["role"])
+-			ret += self.getUserContext (u, u, users[u]["role"])
++			ret += self.getHomeDirContext (u, users[u]["seuser"], users[u]["home"], users[u]["role"])
++			ret += self.getUserContext (u, users[u]["seuser"], users[u]["role"])
+ 		return ret+"\n"
+ 
+ 	def checkExists(self, home):
+@@ -309,7 +310,7 @@
+ 	def genoutput(self):
+ 		ret= self.heading()
+ 		for h in self.getHomeDirs():
+-			ret += self.getHomeDirContext ("user_u" , h+'/[^/]*', "user")
++			ret += self.getHomeDirContext ("user_u", "user_u" , h+'/[^/]*', "user")
+ 			ret += self.getHomeRootContext(h)
+ 		ret += self.getUserContext(".*", "user_u", "user") + "\n"
+ 		ret += self.genHomeDirContext()


Index: policycoreutils.spec
===================================================================
RCS file: /cvs/dist/rpms/policycoreutils/devel/policycoreutils.spec,v
retrieving revision 1.222
retrieving revision 1.223
diff -u -r1.222 -r1.223
--- policycoreutils.spec	19 Jan 2006 21:14:38 -0000	1.222
+++ policycoreutils.spec	19 Jan 2006 22:25:24 -0000	1.223
@@ -4,7 +4,7 @@
 Summary: SELinux policy core utilities.
 Name: policycoreutils
 Version: 1.29.9
-Release: 1
+Release: 2
 License: GPL
 Group: System Environment/Base
 Source: http://www.nsa.gov/selinux/archives/policycoreutils-%{version}.tgz
@@ -97,6 +97,9 @@
 %{_libdir}/python2.4/site-packages/seobject.py*
 
 %changelog
+* Thu Jan 19 2006 Dan Walsh <dwalsh at redhat.com> 1.29.9-2
+- Fix genhomedircon to work on MLS policy
+
 * Thu Jan 19 2006 Dan Walsh <dwalsh at redhat.com> 1.29.9-1
 - Update to match NSA
 	* Merged chcat, semanage, and setsebool patches from Dan Walsh.




More information about the fedora-cvs-commits mailing list