* Fri Feb 24 2005 Dan Walsh <dwalsh@redhat.com> 1.21.20-1

- Update to latest from NSA
- Add call to libsepol
This commit is contained in:
Daniel J Walsh 2005-02-25 18:52:27 +00:00
parent cc0bd43aff
commit 12b6a62a7a
4 changed files with 30 additions and 90 deletions

View File

@ -23,3 +23,4 @@ policycoreutils-1.21.15.tgz
policycoreutils-1.21.17.tgz policycoreutils-1.21.17.tgz
policycoreutils-1.21.18.tgz policycoreutils-1.21.18.tgz
policycoreutils-1.21.19.tgz policycoreutils-1.21.19.tgz
policycoreutils-1.21.20.tgz

View File

@ -1,87 +1,22 @@
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/scripts/fixfiles policycoreutils-1.21.19/scripts/fixfiles diff --exclude-from=exclude -N -u -r nsapolicycoreutils/load_policy/load_policy.c policycoreutils-1.21.20/load_policy/load_policy.c
--- nsapolicycoreutils/scripts/fixfiles 2005-02-08 13:27:03.000000000 -0500 --- nsapolicycoreutils/load_policy/load_policy.c 2005-02-22 16:37:16.000000000 -0500
+++ policycoreutils-1.21.19/scripts/fixfiles 2005-02-24 13:32:53.000000000 -0500 +++ policycoreutils-1.21.20/load_policy/load_policy.c 2005-02-25 10:26:45.000000000 -0500
@@ -78,8 +78,8 @@ @@ -49,6 +49,7 @@
esac; \ break;
fi; \ case 'q':
done | \ quiet = 1;
- while read pattern ; do find $pattern -maxdepth 0 -print; done 2> /dev/null | \ + sepol_debug(0);
- ${RESTORECON} -R $2 -v -e /root -e /home -e /tmp -e /var/tmp -e /dev -f - break;
+ while read pattern ; do find $pattern \( -fstype ext2 -o -fstype ext3 -o -fstype reiserfs -o -fstype xfs \) -print; done 2> /dev/null | \ default:
+ ${RESTORECON} $2 -v -e /root -e /home -e /tmp -e /var/tmp -e /dev -f - usage(argv[0]);
rm -f ${TEMPFILE} @@ -87,7 +88,9 @@
fi
}
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
+++ policycoreutils-1.21.19/scripts/genhomedircon 2005-02-24 14:13:15.000000000 -0500
@@ -154,13 +154,13 @@
def getDefaultHomeDir():
rc=commands.getstatusoutput("grep ^HOME= /etc/default/useradd | tail -1")
if rc[0]==0:
- return rc[1].split("=")[-1]
+ return rc[1].split("=")[-1].strip()
return "/home"
def getSELinuxType(directory): ret = sepol_genusers(map, sb.st_size, selinux_users_path(), &data, &data_size);
rc=commands.getstatusoutput("grep ^SELINUXTYPE= %s/config | tail -1" % directory) if (ret < 0) {
if rc[0]==0: - fprintf(stderr, _("%s: Error while setting user configuration from %s: %s\n"), argv[0], selinux_users_path(), strerror(errno));
- return rc[1].split("=")[-1] + /* No users file; non-fatal. */
+ return rc[1].split("=")[-1].strip() + if (! quiet)
return "targeted" + fprintf(stderr, _("%s: Error while setting user configuration from %s/{local.users,system.users}: %s\n"), argv[0], selinux_users_path(), strerror(errno));
data = map;
def usage(error = ""): data_size = sb.st_size;
@@ -203,13 +203,15 @@ }
def getHomeRootContext(self, homedir):
rc=commands.getstatusoutput("grep HOME_ROOT %s | sed -e \"s|^HOME_ROOT|%s|\"" % ( self.getHomeDirTemplate(), homedir))
if rc[0] == 0:
- return rc[1]
+ return rc[1]+"\n"
else:
errorExit(string.join("sed error ", rc[1]))
def getUsersFile(self):
return self.selinuxdir+self.type+"/users/local.users"
+ def getSystemUsersFile(self):
+ return self.selinuxdir+self.type+"/users/system.users"
def heading(self):
ret = "\n#\n#\n# User-specific file contexts, generated via %s\n" % sys.argv[0]
@@ -217,11 +219,17 @@
return ret
def getUsers(self):
+ users=""
+ rc = commands.getstatusoutput('grep "^user" %s' % self.getSystemUsersFile())
+ if rc[0] == 0:
+ users+=rc[1]+"\n"
rc = commands.getstatusoutput("grep ^user %s" % self.getUsersFile())
+ if rc[0] == 0:
+ users+=rc[1]
udict = {}
prefs = {}
- if rc[0] == 0:
- ulist = rc[1].strip().split("\n")
+ if users != "":
+ ulist = users.split("\n")
for u in ulist:
user = u.split()
try:
@@ -254,7 +262,7 @@
# 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"])
- return ret
+ return ret+"\n"
def checkExists(self, home):
return commands.getstatusoutput("grep -E '^%s[^[:alnum:]_-]' %s" % (home, self.getFileContextFile()))[0]
@@ -285,7 +293,6 @@
ret= self.heading()
for h in self.getHomeDirs():
ret += self.getHomeDirContext ("user_u" , h+'/[^/]*', "user")
- ret += "\n"
ret += self.getHomeRootContext(h)
ret += self.genHomeDirContext()
return ret

View File

@ -1,9 +1,9 @@
%define libselinuxver 1.21.10-1 %define libselinuxver 1.21.10-1
%define libsepolver 1.3.5 %define libsepolver 1.3.6-2
Summary: SELinux policy core utilities. Summary: SELinux policy core utilities.
Name: policycoreutils Name: policycoreutils
Version: 1.21.19 Version: 1.21.20
Release: 4 Release: 1
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,6 +82,10 @@ rm -rf ${RPM_BUILD_ROOT}
%config(noreplace) %{_sysconfdir}/sestatus.conf %config(noreplace) %{_sysconfdir}/sestatus.conf
%changelog %changelog
* Fri Feb 24 2005 Dan Walsh <dwalsh@redhat.com> 1.21.20-1
- Update to latest from NSA
- Add call to libsepol
* Thu Feb 23 2005 Dan Walsh <dwalsh@redhat.com> 1.21.19-4 * 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 - Fix fixfiles to better handle file system types

View File

@ -1 +1 @@
f0d3980fab44dd0df9b45ca8102c6f20 policycoreutils-1.21.19.tgz ae9dc6cef75e7b3496bf64bd993685dc policycoreutils-1.21.20.tgz