* Fri Dec 23 2005 Dan Walsh <dwalsh@redhat.com> 1.29.2-7

- Anaconda fixes
This commit is contained in:
Daniel J Walsh 2005-12-24 00:36:40 +00:00
parent ab201d7429
commit 2700d2d0ed
2 changed files with 39 additions and 29 deletions

View File

@ -1,6 +1,6 @@
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/scripts/chcat policycoreutils-1.29.2/scripts/chcat
--- nsapolicycoreutils/scripts/chcat 2005-12-14 14:16:50.000000000 -0500
+++ policycoreutils-1.29.2/scripts/chcat 2005-12-20 17:12:59.000000000 -0500
+++ policycoreutils-1.29.2/scripts/chcat 2005-12-22 16:29:28.000000000 -0500
@@ -39,11 +39,11 @@
print("Can not modify sensitivity levels using '+' on %s" % f)
@ -205,7 +205,7 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/scripts/chcat policycore
usage()
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/scripts/chcat.8 policycoreutils-1.29.2/scripts/chcat.8
--- nsapolicycoreutils/scripts/chcat.8 2005-12-08 12:52:47.000000000 -0500
+++ policycoreutils-1.29.2/scripts/chcat.8 2005-12-20 13:42:21.000000000 -0500
+++ policycoreutils-1.29.2/scripts/chcat.8 2005-12-22 16:29:28.000000000 -0500
@@ -11,6 +11,9 @@
.B chcat
[\fI-d\fR] \fIFILE\fR...
@ -228,7 +228,13 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/scripts/chcat.8 policyco
chcon(1), selinux(8)
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-22 15:52:20.000000000 -0500
+++ policycoreutils-1.29.2/scripts/genhomedircon 2005-12-23 19:35:20.000000000 -0500
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#! /usr/bin/python
# Copyright (C) 2004 Tresys Technology, LLC
# see file 'COPYING' for use and warranty information
#
@@ -26,64 +26,73 @@
#
#
@ -421,7 +427,7 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/scripts/genhomedircon po
def getUsers(self):
udict = {}
@@ -190,30 +213,45 @@
@@ -190,30 +213,50 @@
self.adduser(udict, semanage_seuser_get_name(seuser), seusername, self.defaultrole(seusername))
else:
@ -430,23 +436,22 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/scripts/genhomedircon po
- ulist = rc[1].split("\n")
- for u in ulist:
- if len(u)==0:
- continue
- user = u.split(":")
- if len(user) < 3:
- continue
- role=self.getOldRole(user[1])
- self.adduser(udict, user[0], user[1], role)
+ fd =open(self.selinuxdir+self.type+"/seusers")
+ for u in fd.read().split('\n'):
+ u=u.strip()
+ if len(u)==0 or u[0]=="#":
+ continue
+ user = u.split(":")
+ if len(user) < 3:
+ continue
+ role=self.getOldRole(user[1])
+ self.adduser(udict, user[0], user[1], role)
+ fd.close()
+ try:
+ fd =open(self.selinuxdir+self.type+"/seusers")
+ for u in fd.read().split('\n'):
+ u=u.strip()
+ if len(u)==0 or u[0]=="#":
continue
user = u.split(":")
if len(user) < 3:
continue
role=self.getOldRole(user[1])
self.adduser(udict, user[0], user[1], role)
+ fd.close()
+ except IOError, error:
+ # Must be install so force add of root
+ self.adduser(udict, "root", "root", "root")
+
return udict
def getHomeDirContext(self, user, home, role):
@ -483,7 +488,7 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/scripts/genhomedircon po
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 +263,23 @@
@@ -225,40 +268,23 @@
return ret+"\n"
def checkExists(self, home):
@ -539,16 +544,18 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/scripts/genhomedircon po
starting_uid=getStartingUID()
if self.usepwd==0:
return homedirs
@@ -270,7 +291,7 @@
@@ -270,8 +296,8 @@
string.count(u[5], "/") > 1:
homedir = u[5][:string.rfind(u[5], "/")]
if not homedir in homedirs:
- if self.checkExists(homedir)==0:
- 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]))
+ if self.checkExists(homedir)==1:
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]))
+ warning("%s homedir %s or its parent directory 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)
@@ -333,7 +354,7 @@
@@ -333,7 +359,7 @@
except getopt.error, error:
errorExit("Options Error %s " % error)
@ -562,7 +569,7 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/scripts/genhomedircon po
+# errorExit("IndexError %s" % error)
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/scripts/selisteners policycoreutils-1.29.2/scripts/selisteners
--- nsapolicycoreutils/scripts/selisteners 1969-12-31 19:00:00.000000000 -0500
+++ policycoreutils-1.29.2/scripts/selisteners 2005-12-20 09:54:52.000000000 -0500
+++ policycoreutils-1.29.2/scripts/selisteners 2005-12-22 16:29:28.000000000 -0500
@@ -0,0 +1,37 @@
+#! /usr/bin/env python
+# Copyright (C) 2005 Red Hat
@ -603,7 +610,7 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/scripts/selisteners poli
+ print "%s %-40s %-10s\t%-20s\t%s" % (x[0], x[3], pid,y[1],selinux.getpidcon(pid)[1])
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/scripts/tests/chcat_test policycoreutils-1.29.2/scripts/tests/chcat_test
--- nsapolicycoreutils/scripts/tests/chcat_test 1969-12-31 19:00:00.000000000 -0500
+++ policycoreutils-1.29.2/scripts/tests/chcat_test 2005-12-20 17:12:23.000000000 -0500
+++ policycoreutils-1.29.2/scripts/tests/chcat_test 2005-12-22 16:29:28.000000000 -0500
@@ -0,0 +1,43 @@
+#!/bin/sh -x
+#
@ -650,7 +657,7 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/scripts/tests/chcat_test
+ls -lZ /tmp/chcat_test
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/scripts/tests/setrans.conf policycoreutils-1.29.2/scripts/tests/setrans.conf
--- nsapolicycoreutils/scripts/tests/setrans.conf 1969-12-31 19:00:00.000000000 -0500
+++ policycoreutils-1.29.2/scripts/tests/setrans.conf 2005-12-20 17:05:16.000000000 -0500
+++ policycoreutils-1.29.2/scripts/tests/setrans.conf 2005-12-22 16:29:28.000000000 -0500
@@ -0,0 +1,23 @@
+#
+# Multi-Category Security translation table for SELinux

View File

@ -4,7 +4,7 @@
Summary: SELinux policy core utilities.
Name: policycoreutils
Version: 1.29.2
Release: 6
Release: 7
License: GPL
Group: System Environment/Base
Source: http://www.nsa.gov/selinux/archives/policycoreutils-%{version}.tgz
@ -96,6 +96,9 @@ rm -rf ${RPM_BUILD_ROOT}
%config(noreplace) %{_sysconfdir}/sestatus.conf
%changelog
* Fri Dec 23 2005 Dan Walsh <dwalsh@redhat.com> 1.29.2-7
- Anaconda fixes
* Thu Dec 22 2005 Dan Walsh <dwalsh@redhat.com> 1.29.2-6
- Turn off try catch block to debug anaconda failure