From eac88e80383fc742aae82571ebf877f736f08f03 Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Tue, 16 Jan 2007 21:44:42 +0000 Subject: [PATCH] * Tue Jan 16 2007 Dan Walsh 1.33.14-1 * Merged newrole man page patch from Michael Thompson. * Merged patch to fix python unicode problem from Dan Walsh. --- .cvsignore | 1 + policycoreutils-rhat.patch | 159 ++++--------------------------------- policycoreutils.spec | 12 ++- sources | 2 +- 4 files changed, 26 insertions(+), 148 deletions(-) diff --git a/.cvsignore b/.cvsignore index 347da94..eccd7ef 100644 --- a/.cvsignore +++ b/.cvsignore @@ -125,3 +125,4 @@ policycoreutils-1.33.8.tgz policycoreutils-1.33.10.tgz policycoreutils-1.33.11.tgz policycoreutils-1.33.12.tgz +policycoreutils-1.33.14.tgz diff --git a/policycoreutils-rhat.patch b/policycoreutils-rhat.patch index 15c2348..d823a29 100644 --- a/policycoreutils-rhat.patch +++ b/policycoreutils-rhat.patch @@ -4874,7 +4874,7 @@ diff --exclude-from=exclude --exclude POTFILES.in --exclude='*.po' --exclude='*. all install relabel clean indent: @for subdir in $(SUBDIRS); do \ diff --exclude-from=exclude --exclude POTFILES.in --exclude='*.po' --exclude='*.pot' -N -u -r nsapolicycoreutils/newrole/newrole.1 policycoreutils-1.33.12/newrole/newrole.1 ---- nsapolicycoreutils/newrole/newrole.1 2006-11-16 17:14:32.000000000 -0500 +--- nsapolicycoreutils/newrole/newrole.1 2007-01-16 15:08:21.000000000 -0500 +++ policycoreutils-1.33.12/newrole/newrole.1 2007-01-12 10:58:07.000000000 -0500 @@ -1,6 +1,6 @@ .TH NEWROLE "1" "October 2000" "Security Enhanced Linux" NSA @@ -5000,69 +5000,19 @@ diff --exclude-from=exclude --exclude POTFILES.in --exclude='*.po' --exclude='*. .SH SYNOPSIS .B secon [\fB-hVurtscmPRfLp\fR] -diff --exclude-from=exclude --exclude POTFILES.in --exclude='*.po' --exclude='*.pot' -N -u -r nsapolicycoreutils/semanage/semanage policycoreutils-1.33.12/semanage/semanage ---- nsapolicycoreutils/semanage/semanage 2006-11-16 17:14:26.000000000 -0500 -+++ policycoreutils-1.33.12/semanage/semanage 2007-01-11 14:12:50.000000000 -0500 -@@ -23,12 +23,21 @@ - import os, sys, getopt - import seobject - import selinux -+PROGNAME="policycoreutils" -+ - import gettext -+gettext.bindtextdomain(PROGNAME, "/usr/share/locale") -+gettext.textdomain(PROGNAME) -+import codecs -+import locale -+sys.stderr = codecs.getwriter(locale.getpreferredencoding())(sys.__stderr__, 'replace') -+sys.stdout = codecs.getwriter(locale.getpreferredencoding())(sys.__stdout__, 'replace') - - try: -- gettext.install('policycoreutils') --except: -- pass -+ gettext.install(PROGNAME, localedir="/usr/share/locale", unicode=1) -+except IOError: -+ import __builtin__ -+ __builtin__.__dict__['_'] = unicode - - is_mls_enabled=selinux.is_selinux_mls_enabled() - diff --exclude-from=exclude --exclude POTFILES.in --exclude='*.po' --exclude='*.pot' -N -u -r nsapolicycoreutils/semanage/seobject.py policycoreutils-1.33.12/semanage/seobject.py ---- nsapolicycoreutils/semanage/seobject.py 2007-01-11 08:56:30.000000000 -0500 -+++ policycoreutils-1.33.12/semanage/seobject.py 2007-01-11 14:14:19.000000000 -0500 -@@ -23,13 +23,16 @@ +--- nsapolicycoreutils/semanage/seobject.py 2007-01-16 15:08:21.000000000 -0500 ++++ policycoreutils-1.33.12/semanage/seobject.py 2007-01-16 14:22:44.000000000 -0500 +@@ -63,7 +63,7 @@ + self.audit_fd = audit.audit_open() - import pwd, string, selinux, tempfile, os, re, sys - from semanage import *; --import gettext -+PROGNAME="policycoreutils" - -+import gettext -+gettext.bindtextdomain(PROGNAME, "/usr/share/locale") -+gettext.textdomain(PROGNAME) - try: -- t = gettext.translation('policycoreutils', '/usr/share/locale') -- _ = t.ugettext --except: -- pass -+ gettext.install(PROGNAME, localedir="/usr/share/locale", unicode=1) -+except IOError: -+ import __builtin__ -+ __builtin__.__dict__['_'] = unicode - - is_mls_enabled = selinux.is_selinux_mls_enabled() - -@@ -168,7 +171,7 @@ - - def list(self,heading = 1): - if heading: -- print "\n%-25s %s\n" % ("Level", "Translation") -+ print "\n%-25s %s\n" % (_("Level"), _("Translation")) - keys = self.ddict.keys() - keys.sort() - for k in keys: -@@ -206,14 +209,14 @@ + def log(self, success, msg, name = "", sename = "", serole = "", serange = "", old_sename = "", old_serole = "", old_serange = ""): +- audit.audit_log_semanage_message(self.audit_fd, audit.AUDIT_USER_ROLE_CHANGE, sys.argv[0],msg, name, 0, sename, serole, serange, old_sename, old_serole, old_serange, "", "", "", success); ++ audit.audit_log_semanage_message(self.audit_fd, audit.AUDIT_USER_ROLE_CHANGE, sys.argv[0],str(msg), name, 0, sename, serole, serange, old_sename, old_serole, old_serange, "", "", "", success); + except: + class logger: + def log(self, success, msg, name = "", sename = "", serole = "", serange = "", old_sename = "", old_serole = "", old_serange = ""): +@@ -209,14 +209,14 @@ os.write(fd, self.out()) os.close(fd) os.rename(newfilename, self.filename) @@ -5080,35 +5030,7 @@ diff --exclude-from=exclude --exclude POTFILES.in --exclude='*.po' --exclude='*. if not self.semanaged: semanage_handle_destroy(self.sh) -@@ -288,10 +291,10 @@ - raise ValueError(_("Could not add login mapping for %s") % name) - - except ValueError, error: -- mylog.log(0, "add SELinux user mapping", name, sename, "", serange); -+ mylog.log(0, _("add SELinux user mapping"), name, sename, "", serange); - raise error - -- mylog.log(1, "add SELinux user mapping", name, sename, "", serange); -+ mylog.log(1, _("add SELinux user mapping"), name, sename, "", serange); - semanage_seuser_key_free(k) - semanage_seuser_free(u) - -@@ -403,12 +406,12 @@ - keys.sort() - if is_mls_enabled == 1: - if heading: -- print "\n%-25s %-25s %-25s\n" % ("Login Name", "SELinux User", "MLS/MCS Range") -+ print "\n%-25s %-25s %-25s\n" % (_("Login Name"), _("SELinux User"), _("MLS/MCS Range")) - for k in keys: - print "%-25s %-25s %-25s" % (k, ddict[k][0], translate(ddict[k][1])) - else: - if heading: -- print "\n%-25s %-25s\n" % ("Login Name", "SELinux User") -+ print "\n%-25s %-25s\n" % (_("Login Name"), _("SELinux User")) - for k in keys: - print "%-25s %-25s" % (k, ddict[k][0]) - -@@ -461,7 +464,8 @@ +@@ -464,7 +464,8 @@ rc = semanage_user_set_mlslevel(self.sh, u, selevel) if rc < 0: raise ValueError(_("Could not set MLS level for %s") % name) @@ -5118,7 +5040,7 @@ diff --exclude-from=exclude --exclude POTFILES.in --exclude='*.po' --exclude='*. rc = semanage_user_set_prefix(self.sh, u, prefix) if rc < 0: raise ValueError(_("Could not add prefix %s for %s") % (r, prefix)) -@@ -527,7 +531,9 @@ +@@ -530,7 +531,9 @@ semanage_user_set_mlslevel(self.sh, u, untranslate(selevel)) if prefix != "": @@ -5129,59 +5051,6 @@ diff --exclude-from=exclude --exclude POTFILES.in --exclude='*.po' --exclude='*. if len(roles) != 0: for r in rlist: -@@ -617,13 +623,13 @@ - keys.sort() - if is_mls_enabled == 1: - if heading: -- print "\n%-15s %-10s %-10s %-30s" % ("", "Labeling", "MLS/", "MLS/") -- print "%-15s %-10s %-10s %-30s %s\n" % ("SELinux User", "Prefix", "MCS Level", "MCS Range", "SELinux Roles") -+ print "\n%-15s %-10s %-10s %-30s" % ("", _("Labeling"), _("MLS/"), _("MLS/")) -+ print "%-15s %-10s %-10s %-30s %s\n" % (_("SELinux User"), _("Prefix"), _("MCS Level"), _("MCS Range"), _("SELinux Roles")) - for k in keys: - print "%-15s %-10s %-10s %-30s %s" % (k, ddict[k][0], translate(ddict[k][1]), translate(ddict[k][2]), ddict[k][3]) - else: - if heading: -- print "%-15s %s\n" % ("SELinux User", "SELinux Roles") -+ print "%-15s %s\n" % (_("SELinux User"), _("SELinux Roles")) - for k in keys: - print "%-15s %s" % (k, ddict[k][3]) - -@@ -832,7 +838,7 @@ - - def list(self, heading = 1): - if heading: -- print "%-30s %-8s %s\n" % ("SELinux Port Type", "Proto", "Port Number") -+ print "%-30s %-8s %s\n" % (_("SELinux Port Type"), _("Proto"), _("Port Number")) - ddict = self.get_all_by_type() - keys = ddict.keys() - keys.sort() -@@ -1002,7 +1008,7 @@ - - def list(self, heading = 1): - if heading: -- print "%-30s %s\n" % ("SELinux Interface", "Context") -+ print "%-30s %s\n" % (_("SELinux Interface"), _("Context")) - ddict = self.get_all() - keys = ddict.keys() - keys.sort() -@@ -1186,7 +1192,7 @@ - - def list(self, heading = 1): - if heading: -- print "%-50s %-18s %s\n" % ("SELinux fcontext", "type", "Context") -+ print "%-50s %-18s %s\n" % (_("SELinux fcontext"), _("type"), _("Context")) - fcon_list = self.get_all() - for fcon in fcon_list: - if len(fcon) > 3: -@@ -1284,7 +1290,7 @@ - - def list(self, heading = 1): - if heading: -- print "%-50s %-18s\n" % ("SELinux boolean", "value") -+ print "%-50s %-18s\n" % (_("SELinux boolean"), _("value")) - ddict = self.get_all() - keys = ddict.keys() - for k in keys: diff --exclude-from=exclude --exclude POTFILES.in --exclude='*.po' --exclude='*.pot' -N -u -r nsapolicycoreutils/semodule_deps/semodule_deps.8 policycoreutils-1.33.12/semodule_deps/semodule_deps.8 --- nsapolicycoreutils/semodule_deps/semodule_deps.8 2006-11-16 17:14:31.000000000 -0500 +++ policycoreutils-1.33.12/semodule_deps/semodule_deps.8 2007-01-12 10:55:43.000000000 -0500 diff --git a/policycoreutils.spec b/policycoreutils.spec index ef714b9..fe09bad 100644 --- a/policycoreutils.spec +++ b/policycoreutils.spec @@ -4,8 +4,8 @@ %define libselinuxver 1.33.4-1 Summary: SELinux policy core utilities. Name: policycoreutils -Version: 1.33.12 -Release: 2%{?dist} +Version: 1.33.14 +Release: 1%{?dist} License: GPL Group: System Environment/Base Source: http://www.nsa.gov/selinux/archives/policycoreutils-%{version}.tgz @@ -168,6 +168,14 @@ fi [ -x /sbin/service ] && /sbin/service restorecond condrestart > /dev/null %changelog +* Tue Jan 16 2007 Dan Walsh 1.33.14-1 + * Merged newrole man page patch from Michael Thompson. + * Merged patch to fix python unicode problem from Dan Walsh. + +* Tue Jan 16 2007 Dan Walsh 1.33.12-3 +- Fix handling of audit messages for useradd change +Resolves: #222159 + * Fri Jan 12 2007 Dan Walsh 1.33.12-2 - Update man pages by adding SELinux to header to fix apropos database Resolves: #217881 diff --git a/sources b/sources index 021656a..418c216 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -9ee1abc2e930c675359c169771cff773 policycoreutils-1.33.12.tgz +af8e1fcccaa6050d3387732e010a529f policycoreutils-1.33.14.tgz