libsemanage/libsemanage-rhat.patch

59 lines
2.6 KiB
Diff

diff --git a/libsemanage/src/Makefile b/libsemanage/src/Makefile
index fc64919..c63bb22 100644
--- a/libsemanage/src/Makefile
+++ b/libsemanage/src/Makefile
@@ -13,12 +13,10 @@ SHLIBDIR ?= $(PREFIX)/lib
INCLUDEDIR ?= $(PREFIX)/include
PYLIBVER ?= $(shell $(PYTHON) -c 'import sys;print("python%d.%d" % sys.version_info[0:2])')
PYINC ?= $(shell pkg-config --cflags $(PYPREFIX))
-PYTHONLIBDIR ?= $(shell pkg-config --libs $(PYPREFIX))
PYLIBDIR ?= $(LIBDIR)/$(PYLIBVER)
RUBYLIBVER ?= $(shell $(RUBY) -e 'print RUBY_VERSION.split(".")[0..1].join(".")')
RUBYPLATFORM ?= $(shell $(RUBY) -e 'print RUBY_PLATFORM')
RUBYINC ?= $(shell pkg-config --cflags ruby-$(RUBYLIBVER))
-RUBYLIBDIR ?= $(shell pkg-config --libs ruby-$(RUBYLIBVER))
RUBYINSTALL ?= $(LIBDIR)/ruby/site_ruby/$(RUBYLIBVER)/$(RUBYPLATFORM)
LIBBASE=$(shell basename $(LIBDIR))
@@ -84,10 +82,10 @@ $(SWIGRUBYLOBJ): $(SWIGRUBYCOUT)
$(CC) $(CFLAGS) $(SWIG_CFLAGS) $(RUBYINC) -fPIC -DSHARED -c -o $@ $<
$(SWIGSO): $(SWIGLOBJ)
- $(CC) $(CFLAGS) $(LDFLAGS) -shared -o $@ $< -L. -lsemanage -L$(LIBDIR) -Wl,-soname,$@
+ $(CC) $(CFLAGS) $(LDFLAGS) -shared -o $@ $< -L. -lsemanage -L$(LIBDIR)
$(SWIGRUBYSO): $(SWIGRUBYLOBJ)
- $(CC) $(CFLAGS) $(LDFLAGS) -shared -o $@ $^ -L. -lsemanage -L$(LIBDIR) -Wl,-soname,$@
+ $(CC) $(CFLAGS) $(LDFLAGS) -shared -o $@ $^ -L. -lsemanage -L$(LIBDIR)
$(LIBA): $(OBJS)
$(AR) rcs $@ $^
diff --git a/libsemanage/src/handle.c b/libsemanage/src/handle.c
index 7fcd2b4..f5cd4d0 100644
--- a/libsemanage/src/handle.c
+++ b/libsemanage/src/handle.c
@@ -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;
- return selinux_binary_policy_path();
+ private_binary_policy_path = selinux_binary_policy_path();
+ return private_binary_policy_path;
}
const char *semanage_usersconf_path() {
diff --git a/libsemanage/src/semanage_store.c b/libsemanage/src/semanage_store.c
index cd7ce68..9c4b1fe 100644
--- a/libsemanage/src/semanage_store.c
+++ b/libsemanage/src/semanage_store.c
@@ -1145,8 +1145,7 @@ static int semanage_install_active(semanage_handle_t * sh)
if (asprintf(&storepath, "%s%s", semanage_selinux_path(), sh->conf->store_path) < 0)
return retval;
- snprintf(store_pol, PATH_MAX, "%s%s.%d", storepath,
- running_policy, sh->conf->policyvers);
+ snprintf(store_pol, PATH_MAX, "%s%s", storepath, running_policy);
if (semanage_copy_file(active_kernel, store_pol, sh->conf->file_mode) ==
-1) {
ERR(sh, "Could not copy %s to %s.", active_kernel, store_pol);