|
|
Author: dwalsh
Update of /cvs/dist/rpms/policycoreutils/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv26504
Modified Files:
policycoreutils-rhat.patch policycoreutils.spec
Log Message:
* Tue Dec 20 2005 Dan Walsh <dwalsh@xxxxxxxxxx> 1.29.2-4
- Add try catch for files that may not exists
* Mon Dec 19 2005 Dan Walsh <dwalsh@xxxxxxxxxx> 1.29.2-3
- Remove commands from genhomedircon for installer
policycoreutils-rhat.patch:
genhomedircon | 239 +++++++++++++++++++++++++++++++---------------------------
1 files changed, 130 insertions(+), 109 deletions(-)
Index: policycoreutils-rhat.patch
===================================================================
RCS file: /cvs/dist/rpms/policycoreutils/devel/policycoreutils-rhat.patch,v
retrieving revision 1.132
retrieving revision 1.133
diff -u -r1.132 -r1.133
--- policycoreutils-rhat.patch 19 Dec 2005 23:22:09 -0000 1.132
+++ policycoreutils-rhat.patch 20 Dec 2005 11:35:21 -0000 1.133
@@ -1,7 +1,7 @@
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/scripts/genhomedircon
policycoreutils-1.29.2/scripts/genhomedircon
--- nsapolicycoreutils/scripts/genhomedircon 2005-12-07 07:28:00.000000000
-0500
-+++ policycoreutils-1.29.2/scripts/genhomedircon 2005-12-19
18:17:05.000000000 -0500
-@@ -26,64 +26,70 @@
++++ policycoreutils-1.29.2/scripts/genhomedircon 2005-12-20
06:32:04.000000000 -0500
+@@ -26,64 +26,73 @@
#
#
@@ -25,16 +25,19 @@
+
+def findval(file, var, delim=""):
+ val=""
-+ fd=open(file, 'r')
-+ for i in fd.read().split('\n'):
-+ if i.startswith(var) == 1:
-+ if delim == "":
-+ val = i.split()[1]
-+ else:
-+ val = i.split(delim)[1]
-+ val = val.split("#")[0]
-+ val = val.strip()
-+ fd.close()
++ try:
++ fd=open(file, 'r')
++ for i in fd.read().split('\n'):
++ if i.startswith(var) == 1:
++ if delim == "":
++ val = i.split()[1]
++ else:
++ val = i.split(delim)[1]
++ val = val.split("#")[0]
++ val = val.strip()
++ fd.close()
++ except:
++ val=""
+ return val
def getStartingUID():
@@ -110,7 +113,7 @@
return "targeted"
def usage(error = ""):
-@@ -129,11 +135,17 @@
+@@ -129,11 +138,17 @@
return self.getFileContextDir()+"/homedir_template"
def getHomeRootContext(self, homedir):
@@ -133,7 +136,7 @@
def heading(self):
ret = "\n#\n#\n# User-specific file contexts, generated via
%s\n" % sys.argv[0]
-@@ -152,32 +164,40 @@
+@@ -152,32 +167,40 @@
return "user_r"
return name
def getOldRole(self, role):
@@ -190,7 +193,7 @@
def getUsers(self):
udict = {}
-@@ -190,30 +210,45 @@
+@@ -190,30 +213,45 @@
self.adduser(udict,
semanage_seuser_get_name(seuser), seusername, self.defaultrole(seusername))
else:
@@ -252,7 +255,7 @@
warning("genhomedircon: Warning! No support yet for
expanding ROLE macros in the %s file when using libsemanage." %
self.getHomeDirTemplate());
warning("genhomedircon: You must manually update
file_contexts.homedirs for any non-user_r users (including root).");
users = self.getUsers()
-@@ -225,40 +260,23 @@
+@@ -225,40 +263,23 @@
return ret+"\n"
def checkExists(self, home):
@@ -308,7 +311,7 @@
starting_uid=getStartingUID()
if self.usepwd==0:
return homedirs
-@@ -270,7 +288,7 @@
+@@ -270,7 +291,7 @@
string.count(u[5], "/") > 1:
homedir = u[5][:string.rfind(u[5], "/")]
if not homedir in homedirs:
@@ -317,7 +320,7 @@
warning("%s homedir %s or its
parent directoy conflicts with a\ndefined context in %s,\n%s will not create a
new context." % (u[0], u[5], self.getFileContextFile(), sys.argv[0]))
else:
homedirs.append(homedir)
-@@ -336,4 +354,4 @@
+@@ -336,4 +357,4 @@
except ValueError, error:
errorExit("ValueError %s" % error)
except IndexError, error:
Index: policycoreutils.spec
===================================================================
RCS file: /cvs/dist/rpms/policycoreutils/devel/policycoreutils.spec,v
retrieving revision 1.198
retrieving revision 1.199
diff -u -r1.198 -r1.199
--- policycoreutils.spec 19 Dec 2005 23:22:09 -0000 1.198
+++ policycoreutils.spec 20 Dec 2005 11:35:21 -0000 1.199
@@ -4,7 +4,7 @@
Summary: SELinux policy core utilities.
Name: policycoreutils
Version: 1.29.2
-Release: 3
+Release: 4
License: GPL
Group: System Environment/Base
Source: http://www.nsa.gov/selinux/archives/policycoreutils-%{version}.tgz
@@ -96,7 +96,10 @@
%config(noreplace) %{_sysconfdir}/sestatus.conf
%changelog
-* Wed Dec 14 2005 Dan Walsh <dwalsh@xxxxxxxxxx> 1.29.2-3
+* Tue Dec 20 2005 Dan Walsh <dwalsh@xxxxxxxxxx> 1.29.2-4
+- Add try catch for files that may not exists
+
+* Mon Dec 19 2005 Dan Walsh <dwalsh@xxxxxxxxxx> 1.29.2-3
- Remove commands from genhomedircon for installer
* Wed Dec 14 2005 Dan Walsh <dwalsh@xxxxxxxxxx> 1.29.2-1
--
fedora-cvs-commits mailing list
fedora-cvs-commits@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-cvs-commits
|
|