* Thu Feb 23 2005 Dan Walsh <dwalsh@redhat.com> 1.21.19-4
- Fix genhomedircon to handle root - Fix fixfiles to better handle file system types
This commit is contained in:
parent
8788976044
commit
6723998b81
@ -1,20 +1,20 @@
|
|||||||
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/scripts/fixfiles policycoreutils-1.21.19/scripts/fixfiles
|
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/scripts/fixfiles policycoreutils-1.21.19/scripts/fixfiles
|
||||||
--- nsapolicycoreutils/scripts/fixfiles 2005-02-08 13:27:03.000000000 -0500
|
--- nsapolicycoreutils/scripts/fixfiles 2005-02-08 13:27:03.000000000 -0500
|
||||||
+++ policycoreutils-1.21.19/scripts/fixfiles 2005-02-23 09:31:45.000000000 -0500
|
+++ policycoreutils-1.21.19/scripts/fixfiles 2005-02-24 13:32:53.000000000 -0500
|
||||||
@@ -78,8 +78,8 @@
|
@@ -78,8 +78,8 @@
|
||||||
esac; \
|
esac; \
|
||||||
fi; \
|
fi; \
|
||||||
done | \
|
done | \
|
||||||
- while read pattern ; do find $pattern -maxdepth 0 -print; done 2> /dev/null | \
|
- while read pattern ; do find $pattern -maxdepth 0 -print; done 2> /dev/null | \
|
||||||
- ${RESTORECON} -R $2 -v -e /root -e /home -e /tmp -e /var/tmp -e /dev -f -
|
- ${RESTORECON} -R $2 -v -e /root -e /home -e /tmp -e /var/tmp -e /dev -f -
|
||||||
+ while read pattern ; do find $pattern -fstype ext2 -fstype ext3 -fstype reiserfs -fstype xfs -print; done 2> /dev/null | \
|
+ while read pattern ; do find $pattern \( -fstype ext2 -o -fstype ext3 -o -fstype reiserfs -o -fstype xfs \) -print; done 2> /dev/null | \
|
||||||
+ ${RESTORECON} $2 -v -e /root -e /home -e /tmp -e /var/tmp -e /dev -f -
|
+ ${RESTORECON} $2 -v -e /root -e /home -e /tmp -e /var/tmp -e /dev -f -
|
||||||
rm -f ${TEMPFILE}
|
rm -f ${TEMPFILE}
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/scripts/genhomedircon policycoreutils-1.21.19/scripts/genhomedircon
|
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/scripts/genhomedircon policycoreutils-1.21.19/scripts/genhomedircon
|
||||||
--- nsapolicycoreutils/scripts/genhomedircon 2005-02-17 14:28:23.000000000 -0500
|
--- nsapolicycoreutils/scripts/genhomedircon 2005-02-17 14:28:23.000000000 -0500
|
||||||
+++ policycoreutils-1.21.19/scripts/genhomedircon 2005-02-24 13:20:09.000000000 -0500
|
+++ policycoreutils-1.21.19/scripts/genhomedircon 2005-02-24 13:35:56.000000000 -0500
|
||||||
@@ -154,13 +154,13 @@
|
@@ -154,13 +154,13 @@
|
||||||
def getDefaultHomeDir():
|
def getDefaultHomeDir():
|
||||||
rc=commands.getstatusoutput("grep ^HOME= /etc/default/useradd | tail -1")
|
rc=commands.getstatusoutput("grep ^HOME= /etc/default/useradd | tail -1")
|
||||||
@ -48,25 +48,28 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/scripts/genhomedircon po
|
|||||||
|
|
||||||
def heading(self):
|
def heading(self):
|
||||||
ret = "\n#\n#\n# User-specific file contexts, generated via %s\n" % sys.argv[0]
|
ret = "\n#\n#\n# User-specific file contexts, generated via %s\n" % sys.argv[0]
|
||||||
@@ -217,11 +219,16 @@
|
@@ -217,11 +219,18 @@
|
||||||
return ret
|
return ret
|
||||||
|
|
||||||
def getUsers(self):
|
def getUsers(self):
|
||||||
+ users=""
|
+ users=""
|
||||||
+ rc = commands.getstatusoutput('grep "^user.*root" %s' % self.getSystemUsersFile())
|
+ rc = commands.getstatusoutput('grep ^user %s' % self.getSystemUsersFile())
|
||||||
+ if rc[0] == 0:
|
+ if rc[0] == 0:
|
||||||
+ users+=rc[1]+"\n"
|
+ users+=rc[1]+"\n"
|
||||||
rc = commands.getstatusoutput("grep ^user %s" % self.getUsersFile())
|
rc = commands.getstatusoutput("grep ^user %s" % self.getUsersFile())
|
||||||
|
+ if rc[0] == 0:
|
||||||
|
+ users+=rc[1]
|
||||||
udict = {}
|
udict = {}
|
||||||
prefs = {}
|
prefs = {}
|
||||||
if rc[0] == 0:
|
- if rc[0] == 0:
|
||||||
- ulist = rc[1].strip().split("\n")
|
- ulist = rc[1].strip().split("\n")
|
||||||
|
+ if users != "":
|
||||||
+ users+=rc[1]
|
+ users+=rc[1]
|
||||||
+ ulist = users.split("\n")
|
+ ulist = users.split("\n")
|
||||||
for u in ulist:
|
for u in ulist:
|
||||||
user = u.split()
|
user = u.split()
|
||||||
try:
|
try:
|
||||||
@@ -254,7 +261,7 @@
|
@@ -254,7 +263,7 @@
|
||||||
# Fill in HOME and ROLE for users that are defined
|
# Fill in HOME and ROLE for users that are defined
|
||||||
for u in users.keys():
|
for u in users.keys():
|
||||||
ret += self.getHomeDirContext (u, users[u]["home"], users[u]["role"])
|
ret += self.getHomeDirContext (u, users[u]["home"], users[u]["role"])
|
||||||
@ -75,7 +78,7 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/scripts/genhomedircon po
|
|||||||
|
|
||||||
def checkExists(self, home):
|
def checkExists(self, home):
|
||||||
return commands.getstatusoutput("grep -E '^%s[^[:alnum:]_-]' %s" % (home, self.getFileContextFile()))[0]
|
return commands.getstatusoutput("grep -E '^%s[^[:alnum:]_-]' %s" % (home, self.getFileContextFile()))[0]
|
||||||
@@ -285,7 +292,6 @@
|
@@ -285,7 +294,6 @@
|
||||||
ret= self.heading()
|
ret= self.heading()
|
||||||
for h in self.getHomeDirs():
|
for h in self.getHomeDirs():
|
||||||
ret += self.getHomeDirContext ("user_u" , h+'/[^/]*', "user")
|
ret += self.getHomeDirContext ("user_u" , h+'/[^/]*', "user")
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
Summary: SELinux policy core utilities.
|
Summary: SELinux policy core utilities.
|
||||||
Name: policycoreutils
|
Name: policycoreutils
|
||||||
Version: 1.21.19
|
Version: 1.21.19
|
||||||
Release: 3
|
Release: 4
|
||||||
License: GPL
|
License: GPL
|
||||||
Group: System Environment/Base
|
Group: System Environment/Base
|
||||||
Source: http://www.nsa.gov/selinux/archives/policycoreutils-%{version}.tgz
|
Source: http://www.nsa.gov/selinux/archives/policycoreutils-%{version}.tgz
|
||||||
@ -82,8 +82,9 @@ rm -rf ${RPM_BUILD_ROOT}
|
|||||||
%config(noreplace) %{_sysconfdir}/sestatus.conf
|
%config(noreplace) %{_sysconfdir}/sestatus.conf
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Thu Feb 23 2005 Dan Walsh <dwalsh@redhat.com> 1.21.19-3
|
* Thu Feb 23 2005 Dan Walsh <dwalsh@redhat.com> 1.21.19-4
|
||||||
- Fix genhomedircon to handle root
|
- Fix genhomedircon to handle root
|
||||||
|
- Fix fixfiles to better handle file system types
|
||||||
|
|
||||||
* Wed Feb 23 2005 Dan Walsh <dwalsh@redhat.com> 1.21.19-2
|
* Wed Feb 23 2005 Dan Walsh <dwalsh@redhat.com> 1.21.19-2
|
||||||
- Fix genhomedircon to handle spaces in SELINUXPOLICYTYPE
|
- Fix genhomedircon to handle spaces in SELINUXPOLICYTYPE
|
||||||
|
Loading…
Reference in New Issue
Block a user