Revert Eric Paris Patch for binary_policy_path
This commit is contained in:
parent
f21a19ce73
commit
ea5e4bfdc0
@ -29,37 +29,10 @@ index fc64919..c63bb22 100644
|
||||
$(LIBA): $(OBJS)
|
||||
$(AR) rcs $@ $^
|
||||
diff --git a/libsemanage/src/handle.c b/libsemanage/src/handle.c
|
||||
index 7fcd2b4..976e3ff 100644
|
||||
index 7fcd2b4..f5cd4d0 100644
|
||||
--- a/libsemanage/src/handle.c
|
||||
+++ b/libsemanage/src/handle.c
|
||||
@@ -66,6 +66,8 @@ void semanage_free_root() {
|
||||
}
|
||||
|
||||
int semanage_set_root(const char *path) {
|
||||
+ char *binary_policy_path;
|
||||
+
|
||||
semanage_free_root();
|
||||
if ( asprintf(&private_selinux_path, "%s/%s", path, selinux_path()) < 0 ) {
|
||||
goto error;
|
||||
@@ -91,9 +93,16 @@ int semanage_set_root(const char *path) {
|
||||
goto error;
|
||||
}
|
||||
|
||||
- if ( asprintf(&private_binary_policy_path, "%s/%s", path, selinux_binary_policy_path()) < 0 ) {
|
||||
+ binary_policy_path = selinux_binary_policy_path();
|
||||
+ if (!binary_policy_path) {
|
||||
+ goto error;
|
||||
+ }
|
||||
+
|
||||
+ if ( asprintf(&private_binary_policy_path, "%s/%s", path, binary_policy_path) < 0 ) {
|
||||
+ free(binary_policy_path);
|
||||
goto error;
|
||||
}
|
||||
+ free(binary_policy_path);
|
||||
|
||||
if ( asprintf(&private_usersconf_path, "%s/%s", path, selinux_usersconf_path()) < 0 ) {
|
||||
goto error;
|
||||
@@ -147,7 +156,8 @@ const char *semanage_binary_policy_path() {
|
||||
@@ -147,7 +147,8 @@ const char *semanage_binary_policy_path() {
|
||||
// printf("private_binary_policy_path %s\n", private_binary_policy_path);
|
||||
if (private_binary_policy_path)
|
||||
return private_binary_policy_path;
|
||||
|
@ -10,7 +10,7 @@
|
||||
Summary: SELinux binary policy manipulation library
|
||||
Name: libsemanage
|
||||
Version: 2.1.8
|
||||
Release: 2%{?dist}
|
||||
Release: 3%{?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
|
||||
* Thu Jul 12 2012 Dan Walsh <dwalsh@redhat.com> - 2.1.8-3
|
||||
- Revert Eric Paris Patch for binary_policy_path
|
||||
|
||||
* Thu Jul 12 2012 Dan Walsh <dwalsh@redhat.com> - 2.1.8-2
|
||||
- Fix asprintf within an asprintf call
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user