libselinux-2.6-3
- Fix 'semanage boolean -m' to modify active value
This commit is contained in:
parent
2f333570bb
commit
26ed72a248
@ -686,6 +686,66 @@ index 724eb65..58b4144 100644
|
||||
last_component = strrchr(tmp_path, '/');
|
||||
|
||||
if (last_component == tmp_path) {
|
||||
diff --git libselinux-2.6/src/selinuxswig_python.i libselinux-2.6/src/selinuxswig_python.i
|
||||
index 8cea18d..43df291 100644
|
||||
--- libselinux-2.6/src/selinuxswig_python.i
|
||||
+++ libselinux-2.6/src/selinuxswig_python.i
|
||||
@@ -64,7 +64,7 @@ def install(src, dest):
|
||||
PyObject* list = PyList_New(*$2);
|
||||
int i;
|
||||
for (i = 0; i < *$2; i++) {
|
||||
- PyList_SetItem(list, i, PyBytes_FromString((*$1)[i]));
|
||||
+ PyList_SetItem(list, i, PyString_FromString((*$1)[i]));
|
||||
}
|
||||
$result = SWIG_Python_AppendOutput($result, list);
|
||||
}
|
||||
@@ -97,9 +97,7 @@ def install(src, dest):
|
||||
len++;
|
||||
plist = PyList_New(len);
|
||||
for (i = 0; i < len; i++) {
|
||||
- PyList_SetItem(plist, i,
|
||||
- PyBytes_FromString((*$1)[i])
|
||||
- );
|
||||
+ PyList_SetItem(plist, i, PyString_FromString((*$1)[i]));
|
||||
}
|
||||
} else {
|
||||
plist = PyList_New(0);
|
||||
@@ -116,9 +114,7 @@ def install(src, dest):
|
||||
if (*$1) {
|
||||
plist = PyList_New(result);
|
||||
for (i = 0; i < result; i++) {
|
||||
- PyList_SetItem(plist, i,
|
||||
- PyBytes_FromString((*$1)[i])
|
||||
- );
|
||||
+ PyList_SetItem(plist, i, PyString_FromString((*$1)[i]));
|
||||
}
|
||||
} else {
|
||||
plist = PyList_New(0);
|
||||
@@ -171,20 +167,16 @@ def install(src, dest):
|
||||
$1 = (char**) malloc(size + 1);
|
||||
|
||||
for(i = 0; i < size; i++) {
|
||||
- if (!PyBytes_Check(PySequence_GetItem($input, i))) {
|
||||
- PyErr_SetString(PyExc_ValueError, "Sequence must contain only bytes");
|
||||
-
|
||||
+ if (!PyString_Check(PySequence_GetItem($input, i))) {
|
||||
+ PyErr_SetString(PyExc_ValueError, "Sequence must contain only strings");
|
||||
return NULL;
|
||||
}
|
||||
-
|
||||
}
|
||||
|
||||
for(i = 0; i < size; i++) {
|
||||
s = PySequence_GetItem($input, i);
|
||||
-
|
||||
- $1[i] = (char*) malloc(PyBytes_Size(s) + 1);
|
||||
- strcpy($1[i], PyBytes_AsString(s));
|
||||
-
|
||||
+ $1[i] = (char*) malloc(PyString_Size(s) + 1);
|
||||
+ strcpy($1[i], PyString_AsString(s));
|
||||
}
|
||||
$1[size] = NULL;
|
||||
}
|
||||
diff --git libselinux-2.6/src/setfilecon.c libselinux-2.6/src/setfilecon.c
|
||||
index d05969c..3f0200e 100644
|
||||
--- libselinux-2.6/src/setfilecon.c
|
||||
|
@ -9,7 +9,7 @@
|
||||
Summary: SELinux library and simple utilities
|
||||
Name: libselinux
|
||||
Version: 2.6
|
||||
Release: 2%{?dist}
|
||||
Release: 3%{?dist}
|
||||
License: Public Domain
|
||||
Group: System Environment/Libraries
|
||||
# https://github.com/SELinuxProject/selinux/wiki/Releases
|
||||
@ -262,6 +262,9 @@ rm -rf %{buildroot}
|
||||
%{ruby_vendorarchdir}/selinux.so
|
||||
|
||||
%changelog
|
||||
* Tue Mar 14 2017 Petr Lautrbach <plautrba@redhat.com> - 2.6-3
|
||||
- Fix 'semanage boolean -m' to modify active value
|
||||
|
||||
* Thu Mar 02 2017 Petr Lautrbach <plautrba@redhat.com> - 2.6-2
|
||||
- Fix FTBFS - fatal error (#1427902)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user