df5eceb2a1
- Fix else path in chcat
122 lines
5.3 KiB
Diff
122 lines
5.3 KiB
Diff
diff --exclude-from=exclude --exclude=sepolgen-1.0.8 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/audit2allow/Makefile policycoreutils-2.0.22/audit2allow/Makefile
|
|
--- nsapolicycoreutils/audit2allow/Makefile 2007-02-07 12:11:49.000000000 -0500
|
|
+++ policycoreutils-2.0.22/audit2allow/Makefile 2007-06-22 09:31:53.000000000 -0400
|
|
@@ -1,6 +1,7 @@
|
|
# Installation directories.
|
|
PREFIX ?= ${DESTDIR}/usr
|
|
BINDIR ?= $(PREFIX)/bin
|
|
+SBINDIR ?= $(PREFIX)/sbin
|
|
LIBDIR ?= $(PREFIX)/lib
|
|
MANDIR ?= $(PREFIX)/share/man
|
|
LOCALEDIR ?= /usr/share/locale
|
|
@@ -10,7 +11,7 @@
|
|
install: all
|
|
-mkdir -p $(BINDIR)
|
|
install -m 755 audit2allow $(BINDIR)
|
|
- install -m 755 sepolgen-ifgen $(BINDIR)
|
|
+ install -m 755 sepolgen-ifgen $(SBINDIR)
|
|
-mkdir -p $(MANDIR)/man1
|
|
install -m 644 audit2allow.1 $(MANDIR)/man1/
|
|
|
|
diff --exclude-from=exclude --exclude=sepolgen-1.0.8 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/Makefile policycoreutils-2.0.22/Makefile
|
|
--- nsapolicycoreutils/Makefile 2007-05-18 09:58:33.000000000 -0400
|
|
+++ policycoreutils-2.0.22/Makefile 2007-06-22 09:31:53.000000000 -0400
|
|
@@ -1,4 +1,4 @@
|
|
-SUBDIRS=setfiles semanage load_policy newrole run_init restorecond secon audit2allow audit2why scripts sestatus semodule_package semodule semodule_link semodule_expand semodule_deps setsebool po
|
|
+SUBDIRS=setfiles semanage load_policy newrole run_init restorecond secon audit2allow audit2why scripts sestatus semodule_package semodule semodule_link semodule_expand semodule_deps setsebool po gui
|
|
|
|
all install relabel clean indent:
|
|
@for subdir in $(SUBDIRS); do \
|
|
diff --exclude-from=exclude --exclude=sepolgen-1.0.8 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/restorecond/restorecond.c policycoreutils-2.0.22/restorecond/restorecond.c
|
|
--- nsapolicycoreutils/restorecond/restorecond.c 2007-02-22 08:53:22.000000000 -0500
|
|
+++ policycoreutils-2.0.22/restorecond/restorecond.c 2007-06-22 09:31:53.000000000 -0400
|
|
@@ -210,9 +210,10 @@
|
|
}
|
|
|
|
if (fsetfilecon(fd, scontext) < 0) {
|
|
- syslog(LOG_ERR,
|
|
- "set context %s->%s failed:'%s'\n",
|
|
- filename, scontext, strerror(errno));
|
|
+ if (errno != EOPNOTSUPP)
|
|
+ syslog(LOG_ERR,
|
|
+ "set context %s->%s failed:'%s'\n",
|
|
+ filename, scontext, strerror(errno));
|
|
if (retcontext >= 0)
|
|
free(prev_context);
|
|
free(scontext);
|
|
@@ -225,8 +226,9 @@
|
|
if (retcontext >= 0)
|
|
free(prev_context);
|
|
} else {
|
|
- syslog(LOG_ERR, "get context on %s failed: '%s'\n",
|
|
- filename, strerror(errno));
|
|
+ if (errno != EOPNOTSUPP)
|
|
+ syslog(LOG_ERR, "get context on %s failed: '%s'\n",
|
|
+ filename, strerror(errno));
|
|
}
|
|
free(scontext);
|
|
close(fd);
|
|
diff --exclude-from=exclude --exclude=sepolgen-1.0.8 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/scripts/chcat policycoreutils-2.0.22/scripts/chcat
|
|
--- nsapolicycoreutils/scripts/chcat 2007-04-24 10:36:17.000000000 -0400
|
|
+++ policycoreutils-2.0.22/scripts/chcat 2007-06-22 09:32:13.000000000 -0400
|
|
@@ -77,7 +77,7 @@
|
|
|
|
if len(cats) > 0:
|
|
new_serange = "%s-%s:%s" % (serange[0], top[0], ",".join(cats))
|
|
- else
|
|
+ else:
|
|
new_serange = "%s-%s" % (serange[0], top[0])
|
|
|
|
if add_ind:
|
|
@@ -155,7 +155,7 @@
|
|
|
|
if len(cats) > 0:
|
|
new_serange = "%s-%s:%s" % (serange[0], top[0], ",".join(cats))
|
|
- else
|
|
+ else:
|
|
new_serange = "%s-%s" % (serange[0], top[0])
|
|
|
|
if add_ind:
|
|
diff --exclude-from=exclude --exclude=sepolgen-1.0.8 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/semanage/semanage policycoreutils-2.0.22/semanage/semanage
|
|
--- nsapolicycoreutils/semanage/semanage 2007-05-04 09:14:39.000000000 -0400
|
|
+++ policycoreutils-2.0.22/semanage/semanage 2007-06-22 09:31:53.000000000 -0400
|
|
@@ -34,7 +34,10 @@
|
|
sys.stdout = codecs.getwriter(locale.getpreferredencoding())(sys.__stdout__, 'replace')
|
|
|
|
try:
|
|
- gettext.install(PROGNAME, localedir="/usr/share/locale", unicode=1)
|
|
+ gettext.install(PROGNAME,
|
|
+ localedir="/usr/share/locale",
|
|
+ unicode=False,
|
|
+ codeset = 'utf-8')
|
|
except IOError:
|
|
import __builtin__
|
|
__builtin__.__dict__['_'] = unicode
|
|
diff --exclude-from=exclude --exclude=sepolgen-1.0.8 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/semanage/seobject.py policycoreutils-2.0.22/semanage/seobject.py
|
|
--- nsapolicycoreutils/semanage/seobject.py 2007-04-12 12:43:06.000000000 -0400
|
|
+++ policycoreutils-2.0.22/semanage/seobject.py 2007-06-22 09:31:53.000000000 -0400
|
|
@@ -210,6 +210,7 @@
|
|
os.write(fd, self.out())
|
|
os.close(fd)
|
|
os.rename(newfilename, self.filename)
|
|
+ os.system("/sbin/service mcstrans reload > /dev/null")
|
|
|
|
class semanageRecords:
|
|
def __init__(self):
|
|
@@ -1283,9 +1284,12 @@
|
|
raise ValueError(_("Could not list booleans"))
|
|
|
|
for boolean in self.blist:
|
|
- name = semanage_bool_get_name(boolean)
|
|
- value = semanage_bool_get_value(boolean)
|
|
- ddict[name] = value
|
|
+ value = []
|
|
+ name = semanage_bool_get_name(boolean)
|
|
+ value[0] = semanage_bool_get_value(boolean)
|
|
+ value[1] = selinux.security_get_boolean_pending(boolean)
|
|
+ value[2] = selinux.security_get_boolean_active(boolean)
|
|
+ ddict[name] = value
|
|
|
|
return ddict
|
|
|