* Mon Oct 15 2007 Dan Walsh <dwalsh@redhat.com> 2.0.31-1
- Remove no.po - Update to upstream * Fix semodule option handling from Dan Walsh. * Add deleteall support for ports and fcontexts in semanage from Dan Walsh.
This commit is contained in:
parent
105dca2943
commit
ccbc11e287
|
@ -162,3 +162,4 @@ policycoreutils-2.0.26.tgz
|
|||
policycoreutils-2.0.27.tgz
|
||||
policycoreutils-2.0.28.tgz
|
||||
policycoreutils-2.0.29.tgz
|
||||
policycoreutils-2.0.31.tgz
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,15 +1,114 @@
|
|||
diff --exclude-from=exclude --exclude=sepolgen-1.0.10 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/Makefile policycoreutils-2.0.28/Makefile
|
||||
diff --exclude-from=exclude --exclude=sepolgen-1.0.10 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/audit2why/audit2why.c policycoreutils-2.0.29/audit2why/audit2why.c
|
||||
--- nsapolicycoreutils/audit2why/audit2why.c 2007-07-16 14:20:41.000000000 -0400
|
||||
+++ policycoreutils-2.0.29/audit2why/audit2why.c 2007-10-08 08:37:08.000000000 -0400
|
||||
@@ -137,6 +137,8 @@
|
||||
/* Process the audit messages. */
|
||||
while (getline(&buffer, &len, stdin) > 0) {
|
||||
size_t len2 = strlen(buffer);
|
||||
+ char *begin, *end, *search_buf;
|
||||
+ int slen = 0;
|
||||
|
||||
if (buffer[len2 - 1] == '\n')
|
||||
buffer[len2 - 1] = 0;
|
||||
@@ -179,6 +181,7 @@
|
||||
}
|
||||
*p++ = 0;
|
||||
|
||||
+ search_buf = p;
|
||||
/* Get scontext and convert to SID. */
|
||||
while (*p && strncmp(p, SCONTEXT, sizeof(SCONTEXT) - 1))
|
||||
p++;
|
||||
@@ -188,11 +191,14 @@
|
||||
continue;
|
||||
}
|
||||
p += sizeof(SCONTEXT) - 1;
|
||||
- scon = p;
|
||||
+ begin = p;
|
||||
while (*p && !isspace(*p))
|
||||
p++;
|
||||
- if (*p)
|
||||
- *p++ = 0;
|
||||
+ end = p;
|
||||
+ slen=end - begin;
|
||||
+ scon = calloc(slen+1, 1);
|
||||
+ strncpy(scon, begin, slen);
|
||||
+
|
||||
rc = sepol_context_to_sid(scon, strlen(scon) + 1, &ssid);
|
||||
if (rc < 0) {
|
||||
fprintf(stderr,
|
||||
@@ -201,6 +207,10 @@
|
||||
continue;
|
||||
}
|
||||
|
||||
+ free(scon);
|
||||
+ /* start searching at the beginning again */
|
||||
+ p = search_buf;
|
||||
+
|
||||
/* Get tcontext and convert to SID. */
|
||||
while (*p && strncmp(p, TCONTEXT, sizeof(TCONTEXT) - 1))
|
||||
p++;
|
||||
@@ -210,11 +220,15 @@
|
||||
continue;
|
||||
}
|
||||
p += sizeof(TCONTEXT) - 1;
|
||||
- tcon = p;
|
||||
+
|
||||
+ begin = p;
|
||||
while (*p && !isspace(*p))
|
||||
p++;
|
||||
- if (*p)
|
||||
- *p++ = 0;
|
||||
+ end = p;
|
||||
+ slen=end - begin;
|
||||
+ tcon = calloc(slen+1, 1);
|
||||
+ strncpy(tcon, begin, slen);
|
||||
+
|
||||
rc = sepol_context_to_sid(tcon, strlen(tcon) + 1, &tsid);
|
||||
if (rc < 0) {
|
||||
fprintf(stderr,
|
||||
@@ -222,6 +236,9 @@
|
||||
TCONTEXT, tcon, lineno);
|
||||
continue;
|
||||
}
|
||||
+ free(tcon);
|
||||
+ /* start searching at the beginning again */
|
||||
+ p = search_buf;
|
||||
|
||||
/* Get tclass= and convert to value. */
|
||||
while (*p && strncmp(p, TCLASS, sizeof(TCLASS) - 1))
|
||||
@@ -232,12 +249,17 @@
|
||||
continue;
|
||||
}
|
||||
p += sizeof(TCLASS) - 1;
|
||||
- tclassstr = p;
|
||||
+ begin = p;
|
||||
while (*p && !isspace(*p))
|
||||
p++;
|
||||
- if (*p)
|
||||
- *p = 0;
|
||||
+
|
||||
+ end = p;
|
||||
+ slen=end - begin;
|
||||
+ tclassstr = calloc(slen+1, 1);
|
||||
+ strncpy(tclassstr, begin, slen);
|
||||
+
|
||||
tclass = string_to_security_class(tclassstr);
|
||||
+ free(tclassstr);
|
||||
if (!tclass) {
|
||||
fprintf(stderr,
|
||||
"Invalid %s%s on line %u, skipping...\n",
|
||||
diff --exclude-from=exclude --exclude=sepolgen-1.0.10 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/Makefile policycoreutils-2.0.29/Makefile
|
||||
--- nsapolicycoreutils/Makefile 2007-07-16 14:20:43.000000000 -0400
|
||||
+++ policycoreutils-2.0.28/Makefile 2007-10-07 21:43:11.000000000 -0400
|
||||
+++ policycoreutils-2.0.29/Makefile 2007-10-08 08:36:41.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.10 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/restorecond/restorecond.c policycoreutils-2.0.28/restorecond/restorecond.c
|
||||
diff --exclude-from=exclude --exclude=sepolgen-1.0.10 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/restorecond/restorecond.c policycoreutils-2.0.29/restorecond/restorecond.c
|
||||
--- nsapolicycoreutils/restorecond/restorecond.c 2007-07-16 14:20:41.000000000 -0400
|
||||
+++ policycoreutils-2.0.28/restorecond/restorecond.c 2007-10-07 21:43:11.000000000 -0400
|
||||
+++ policycoreutils-2.0.29/restorecond/restorecond.c 2007-10-08 08:36:41.000000000 -0400
|
||||
@@ -210,9 +210,10 @@
|
||||
}
|
||||
|
||||
|
@ -36,9 +135,9 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.10 --exclude=gui --exclude=po
|
|||
}
|
||||
free(scontext);
|
||||
close(fd);
|
||||
diff --exclude-from=exclude --exclude=sepolgen-1.0.10 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/semanage/seobject.py policycoreutils-2.0.28/semanage/seobject.py
|
||||
diff --exclude-from=exclude --exclude=sepolgen-1.0.10 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/semanage/seobject.py policycoreutils-2.0.29/semanage/seobject.py
|
||||
--- nsapolicycoreutils/semanage/seobject.py 2007-10-07 21:46:43.000000000 -0400
|
||||
+++ policycoreutils-2.0.28/semanage/seobject.py 2007-10-05 13:10:29.000000000 -0400
|
||||
+++ policycoreutils-2.0.29/semanage/seobject.py 2007-10-08 08:36:41.000000000 -0400
|
||||
@@ -139,7 +139,7 @@
|
||||
translations = fd.readlines()
|
||||
fd.close()
|
||||
|
@ -58,71 +157,3 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.10 --exclude=gui --exclude=po
|
|||
|
||||
class loginRecords(semanageRecords):
|
||||
def __init__(self, store = ""):
|
||||
@@ -779,34 +776,6 @@
|
||||
semanage_port_key_free(k)
|
||||
semanage_port_free(p)
|
||||
|
||||
- def deleteall(self):
|
||||
- (rc, plist) = semanage_port_list_local(self.sh)
|
||||
- if rc < 0:
|
||||
- raise ValueError(_("Could not list the ports"))
|
||||
-
|
||||
- rc = semanage_begin_transaction(self.sh)
|
||||
- if rc < 0:
|
||||
- raise ValueError(_("Could not start semanage transaction"))
|
||||
-
|
||||
- for port in plist:
|
||||
- proto = semanage_port_get_proto(port)
|
||||
- proto_str = semanage_port_get_proto_str(proto)
|
||||
- low = semanage_port_get_low(port)
|
||||
- high = semanage_port_get_high(port)
|
||||
- port_str = "%s-%s" % (low, high)
|
||||
- ( k, proto_d, low, high ) = self.__genkey(port_str , proto_str)
|
||||
- if rc < 0:
|
||||
- raise ValueError(_("Could not create a key for %s") % port_str)
|
||||
-
|
||||
- rc = semanage_port_del_local(self.sh, k)
|
||||
- if rc < 0:
|
||||
- raise ValueError(_("Could not delete the port %s") % port_str)
|
||||
- semanage_port_key_free(k)
|
||||
-
|
||||
- rc = semanage_commit(self.sh)
|
||||
- if rc < 0:
|
||||
- raise ValueError(_("Could not delete the %s") % port_str)
|
||||
-
|
||||
def delete(self, port, proto):
|
||||
( k, proto_d, low, high ) = self.__genkey(port, proto)
|
||||
(rc,exists) = semanage_port_exists(self.sh, k)
|
||||
@@ -1206,32 +1175,6 @@
|
||||
semanage_fcontext_key_free(k)
|
||||
semanage_fcontext_free(fcontext)
|
||||
|
||||
- def deleteall(self):
|
||||
- (rc, flist) = semanage_fcontext_list_local(self.sh)
|
||||
- if rc < 0:
|
||||
- raise ValueError(_("Could not list the file contexts"))
|
||||
-
|
||||
- rc = semanage_begin_transaction(self.sh)
|
||||
- if rc < 0:
|
||||
- raise ValueError(_("Could not start semanage transaction"))
|
||||
-
|
||||
- for fcontext in flist:
|
||||
- target = semanage_fcontext_get_expr(fcontext)
|
||||
- ftype = semanage_fcontext_get_type(fcontext)
|
||||
- ftype_str = semanage_fcontext_get_type_str(ftype)
|
||||
- (rc,k) = semanage_fcontext_key_create(self.sh, target, file_types[ftype_str])
|
||||
- if rc < 0:
|
||||
- raise ValueError(_("Could not create a key for %s") % target)
|
||||
-
|
||||
- rc = semanage_fcontext_del_local(self.sh, k)
|
||||
- if rc < 0:
|
||||
- raise ValueError(_("Could not delete the file context %s") % target)
|
||||
- semanage_fcontext_key_free(k)
|
||||
-
|
||||
- rc = semanage_commit(self.sh)
|
||||
- if rc < 0:
|
||||
- raise ValueError(_("Could not delete the file context %s") % target)
|
||||
-
|
||||
def delete(self, target, ftype):
|
||||
(rc,k) = semanage_fcontext_key_create(self.sh, target, file_types[ftype])
|
||||
if rc < 0:
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
%define sepolgenver 1.0.10
|
||||
Summary: SELinux policy core utilities
|
||||
Name: policycoreutils
|
||||
Version: 2.0.29
|
||||
Version: 2.0.31
|
||||
Release: 1%{?dist}
|
||||
License: GPLv2+
|
||||
Group: System Environment/Base
|
||||
|
@ -200,6 +200,15 @@ if [ "$1" -ge "1" ]; then
|
|||
fi
|
||||
|
||||
%changelog
|
||||
* Mon Oct 15 2007 Dan Walsh <dwalsh@redhat.com> 2.0.31-1
|
||||
- Remove no.po
|
||||
- Update to upstream
|
||||
* Fix semodule option handling from Dan Walsh.
|
||||
* Add deleteall support for ports and fcontexts in semanage from Dan Walsh.
|
||||
|
||||
* Thu Oct 11 2007 Dan Walsh <dwalsh@redhat.com> 2.0.29-2
|
||||
- Fix semodule parameter checking
|
||||
|
||||
* Sun Oct 7 2007 Dan Walsh <dwalsh@redhat.com> 2.0.29-1
|
||||
- Update to upstream
|
||||
* Add genhomedircon script to invoke semodule -Bn from Dan Walsh.
|
||||
|
|
Loading…
Reference in New Issue