[libsemanage] Apply patch from Sven Vermeulen to fix problem with python3 bindings.
Daniel J Walsh
dwalsh at fedoraproject.org
Tue May 29 15:17:07 UTC 2012
commit 340a7403e476e2bcd345517ec7d2f2c84c522d1f
Author: Dan Walsh <dwalsh at redhat.com>
Date: Tue May 29 11:17:02 2012 -0400
Apply patch from Sven Vermeulen to fix problem with python3 bindings.
libsemanage-rhat.patch | 25 +++++++++++++++++++++++++
libsemanage.spec | 5 ++++-
2 files changed, 29 insertions(+), 1 deletions(-)
---
diff --git a/libsemanage-rhat.patch b/libsemanage-rhat.patch
index 0330b20..0d8356f 100644
--- a/libsemanage-rhat.patch
+++ b/libsemanage-rhat.patch
@@ -1,3 +1,28 @@
+diff --git a/libsemanage/src/fcontext_record.c b/libsemanage/src/fcontext_record.c
+index ec02a89..3f9d893 100644
+--- a/libsemanage/src/fcontext_record.c
++++ b/libsemanage/src/fcontext_record.c
+@@ -45,7 +45,11 @@ int semanage_fcontext_key_create(semanage_handle_t * handle,
+ "create file context key");
+ return STATUS_ERR;
+ }
+- tmp_key->expr = expr;
++ tmp_key->expr = strdup(expr);
++ if (!tmp_key->expr) {
++ ERR(handle, "out of memory, could not create file context key.");
++ return STATUS_ERR;
++ }
+ tmp_key->type = type;
+
+ *key_ptr = tmp_key;
+@@ -74,6 +78,7 @@ hidden_def(semanage_fcontext_key_extract)
+
+ void semanage_fcontext_key_free(semanage_fcontext_key_t * key)
+ {
++ free(key->expr);
+ free(key);
+ }
+
diff --git a/libsemanage/src/handle.c b/libsemanage/src/handle.c
index 4b43ba7..7fcd2b4 100644
--- a/libsemanage/src/handle.c
diff --git a/libsemanage.spec b/libsemanage.spec
index 9170776..af3b793 100644
--- a/libsemanage.spec
+++ b/libsemanage.spec
@@ -10,7 +10,7 @@
Summary: SELinux binary policy manipulation library
Name: libsemanage
Version: 2.1.7
-Release: 1%{?dist}
+Release: 2%{?dist}
License: LGPLv2+
Group: System Environment/Libraries
Source: libsemanage-%{version}.tgz
@@ -180,6 +180,9 @@ rm -rf ${RPM_BUILD_ROOT}
%endif # if with_python3
%changelog
+* Tue May 29 2012 Dan Walsh <dwalsh at redhat.com> - 2.1.7-2
+- Apply patch from Sven Vermeulen to fix problem with python3 bindings.
+
* Thu Mar 29 2012 Dan Walsh <dwalsh at redhat.com> - 2.1.7-1
- Update to upstream
* Alternate path for semanage.conf
More information about the scm-commits
mailing list