From e4e544ece90ec3dcdaf621f7223e2d89a34e487b Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Feb 25 2005 20:11:44 +0000 Subject: * Fri Feb 24 2005 Dan Walsh 1.21.20-2 - Fix genhomedircon to handle blank users --- diff --git a/policycoreutils-rhat.patch b/policycoreutils-rhat.patch index ace5fe5..7e5acd1 100644 --- a/policycoreutils-rhat.patch +++ b/policycoreutils-rhat.patch @@ -20,3 +20,24 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/load_policy/load_policy. data = map; data_size = sb.st_size; } +diff --exclude-from=exclude -N -u -r nsapolicycoreutils/scripts/genhomedircon policycoreutils-1.21.20/scripts/genhomedircon +--- nsapolicycoreutils/scripts/genhomedircon 2005-02-25 09:16:14.000000000 -0500 ++++ policycoreutils-1.21.20/scripts/genhomedircon 2005-02-25 15:08:14.183581120 -0500 +@@ -222,7 +222,7 @@ + users="" + rc = commands.getstatusoutput('grep "^user" %s' % self.getSystemUsersFile()) + if rc[0] == 0: +- users+=rc[1]+"\n" ++ users+=rc[1] + rc = commands.getstatusoutput("grep ^user %s" % self.getUsersFile()) + if rc[0] == 0: + users+=rc[1] +@@ -233,7 +233,7 @@ + for u in ulist: + user = u.split() + try: +- if user[1] == "user_u" or user[1] == "system_u": ++ if len(user)==0 or user[1] == "user_u" or user[1] == "system_u": + continue + # !!! chooses first role in the list to use in the file context !!! + role = user[3] diff --git a/policycoreutils.spec b/policycoreutils.spec index ec56943..71be7fe 100644 --- a/policycoreutils.spec +++ b/policycoreutils.spec @@ -1,9 +1,9 @@ %define libselinuxver 1.21.10-1 -%define libsepolver 1.3.6-2 +%define libsepolver 1.3.6-3 Summary: SELinux policy core utilities. Name: policycoreutils Version: 1.21.20 -Release: 1 +Release: 2 License: GPL Group: System Environment/Base Source: http://www.nsa.gov/selinux/archives/policycoreutils-%{version}.tgz @@ -82,6 +82,9 @@ rm -rf ${RPM_BUILD_ROOT} %config(noreplace) %{_sysconfdir}/sestatus.conf %changelog +* Fri Feb 24 2005 Dan Walsh 1.21.20-2 +- Fix genhomedircon to handle blank users + * Fri Feb 24 2005 Dan Walsh 1.21.20-1 - Update to latest from NSA - Add call to libsepol