Update to upstream
* remove build warning when build swig c files * additional makefile support for rubywrap * ignore 80 column limit for readability * semanage_store: fix snprintf length argument by using asprintf * Use default semanage.conf as a fallback * use after free in python bindings
This commit is contained in:
parent
340a7403e4
commit
114463ed84
1
.gitignore
vendored
1
.gitignore
vendored
@ -126,3 +126,4 @@ libsemanage-2.0.45.tgz
|
|||||||
/libsemanage-2.1.5.tgz
|
/libsemanage-2.1.5.tgz
|
||||||
/libsemanage-2.1.6.tgz
|
/libsemanage-2.1.6.tgz
|
||||||
/libsemanage-2.1.7.tgz
|
/libsemanage-2.1.7.tgz
|
||||||
|
/libsemanage-2.1.8.tgz
|
||||||
|
@ -1,39 +1,58 @@
|
|||||||
diff --git a/libsemanage/src/fcontext_record.c b/libsemanage/src/fcontext_record.c
|
diff --git a/libsemanage/src/Makefile b/libsemanage/src/Makefile
|
||||||
index ec02a89..3f9d893 100644
|
index fc64919..c63bb22 100644
|
||||||
--- a/libsemanage/src/fcontext_record.c
|
--- a/libsemanage/src/Makefile
|
||||||
+++ b/libsemanage/src/fcontext_record.c
|
+++ b/libsemanage/src/Makefile
|
||||||
@@ -45,7 +45,11 @@ int semanage_fcontext_key_create(semanage_handle_t * handle,
|
@@ -13,12 +13,10 @@ SHLIBDIR ?= $(PREFIX)/lib
|
||||||
"create file context key");
|
INCLUDEDIR ?= $(PREFIX)/include
|
||||||
return STATUS_ERR;
|
PYLIBVER ?= $(shell $(PYTHON) -c 'import sys;print("python%d.%d" % sys.version_info[0:2])')
|
||||||
}
|
PYINC ?= $(shell pkg-config --cflags $(PYPREFIX))
|
||||||
- tmp_key->expr = expr;
|
-PYTHONLIBDIR ?= $(shell pkg-config --libs $(PYPREFIX))
|
||||||
+ tmp_key->expr = strdup(expr);
|
PYLIBDIR ?= $(LIBDIR)/$(PYLIBVER)
|
||||||
+ if (!tmp_key->expr) {
|
RUBYLIBVER ?= $(shell $(RUBY) -e 'print RUBY_VERSION.split(".")[0..1].join(".")')
|
||||||
+ ERR(handle, "out of memory, could not create file context key.");
|
RUBYPLATFORM ?= $(shell $(RUBY) -e 'print RUBY_PLATFORM')
|
||||||
+ return STATUS_ERR;
|
RUBYINC ?= $(shell pkg-config --cflags ruby-$(RUBYLIBVER))
|
||||||
+ }
|
-RUBYLIBDIR ?= $(shell pkg-config --libs ruby-$(RUBYLIBVER))
|
||||||
tmp_key->type = type;
|
RUBYINSTALL ?= $(LIBDIR)/ruby/site_ruby/$(RUBYLIBVER)/$(RUBYPLATFORM)
|
||||||
|
|
||||||
*key_ptr = tmp_key;
|
LIBBASE=$(shell basename $(LIBDIR))
|
||||||
@@ -74,6 +78,7 @@ hidden_def(semanage_fcontext_key_extract)
|
@@ -84,10 +82,10 @@ $(SWIGRUBYLOBJ): $(SWIGRUBYCOUT)
|
||||||
|
$(CC) $(CFLAGS) $(SWIG_CFLAGS) $(RUBYINC) -fPIC -DSHARED -c -o $@ $<
|
||||||
|
|
||||||
void semanage_fcontext_key_free(semanage_fcontext_key_t * key)
|
$(SWIGSO): $(SWIGLOBJ)
|
||||||
{
|
- $(CC) $(CFLAGS) $(LDFLAGS) -shared -o $@ $< -L. -lsemanage -L$(LIBDIR) -Wl,-soname,$@
|
||||||
+ free(key->expr);
|
+ $(CC) $(CFLAGS) $(LDFLAGS) -shared -o $@ $< -L. -lsemanage -L$(LIBDIR)
|
||||||
free(key);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
$(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
|
diff --git a/libsemanage/src/handle.c b/libsemanage/src/handle.c
|
||||||
index 4b43ba7..7fcd2b4 100644
|
index 7fcd2b4..f5cd4d0 100644
|
||||||
--- a/libsemanage/src/handle.c
|
--- a/libsemanage/src/handle.c
|
||||||
+++ b/libsemanage/src/handle.c
|
+++ b/libsemanage/src/handle.c
|
||||||
@@ -186,7 +186,8 @@ const char *semanage_selinux_path(void) {
|
@@ -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_conf_path(void)
|
const char *semanage_usersconf_path() {
|
||||||
{
|
diff --git a/libsemanage/src/semanage_store.c b/libsemanage/src/semanage_store.c
|
||||||
- if (private_semanage_conf_path)
|
index cd7ce68..9c4b1fe 100644
|
||||||
+ if (private_semanage_conf_path &&
|
--- a/libsemanage/src/semanage_store.c
|
||||||
+ access(private_semanage_conf_path, R_OK) == 0)
|
+++ b/libsemanage/src/semanage_store.c
|
||||||
return private_semanage_conf_path;
|
@@ -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;
|
||||||
|
|
||||||
return SEMANAGE_CONF_PATH;
|
- 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);
|
||||||
|
@ -9,8 +9,8 @@
|
|||||||
|
|
||||||
Summary: SELinux binary policy manipulation library
|
Summary: SELinux binary policy manipulation library
|
||||||
Name: libsemanage
|
Name: libsemanage
|
||||||
Version: 2.1.7
|
Version: 2.1.8
|
||||||
Release: 2%{?dist}
|
Release: 1%{?dist}
|
||||||
License: LGPLv2+
|
License: LGPLv2+
|
||||||
Group: System Environment/Libraries
|
Group: System Environment/Libraries
|
||||||
Source: libsemanage-%{version}.tgz
|
Source: libsemanage-%{version}.tgz
|
||||||
@ -180,6 +180,15 @@ rm -rf ${RPM_BUILD_ROOT}
|
|||||||
%endif # if with_python3
|
%endif # if with_python3
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Jul 4 2012 Dan Walsh <dwalsh@redhat.com> - 2.1.8-1
|
||||||
|
- Update to upstream
|
||||||
|
* remove build warning when build swig c files
|
||||||
|
* additional makefile support for rubywrap
|
||||||
|
* ignore 80 column limit for readability
|
||||||
|
* semanage_store: fix snprintf length argument by using asprintf
|
||||||
|
* Use default semanage.conf as a fallback
|
||||||
|
* use after free in python bindings
|
||||||
|
|
||||||
* Tue May 29 2012 Dan Walsh <dwalsh@redhat.com> - 2.1.7-2
|
* Tue May 29 2012 Dan Walsh <dwalsh@redhat.com> - 2.1.7-2
|
||||||
- Apply patch from Sven Vermeulen to fix problem with python3 bindings.
|
- Apply patch from Sven Vermeulen to fix problem with python3 bindings.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user