Update to upstream
* Alternate path for semanage.conf * do not link against libpython, this is considered bad in Debian * Allow to build for several ruby version * fallback-user-level
This commit is contained in:
parent
6bcdc7fca5
commit
72a84c3f42
1
.gitignore
vendored
1
.gitignore
vendored
@ -125,3 +125,4 @@ libsemanage-2.0.45.tgz
|
|||||||
/libsemanage-2.1.4.tgz
|
/libsemanage-2.1.4.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
|
||||||
|
@ -1,106 +1,14 @@
|
|||||||
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 7adc1cc..7fcd2b4 100644
|
index 4b43ba7..7fcd2b4 100644
|
||||||
--- a/libsemanage/src/handle.c
|
--- a/libsemanage/src/handle.c
|
||||||
+++ b/libsemanage/src/handle.c
|
+++ b/libsemanage/src/handle.c
|
||||||
@@ -37,10 +37,12 @@
|
@@ -186,7 +186,8 @@ const char *semanage_selinux_path(void) {
|
||||||
#include "semanage_store.h"
|
|
||||||
|
|
||||||
#define SEMANAGE_COMMIT_READ_WAIT 5
|
const char *semanage_conf_path(void)
|
||||||
+#define SEMANAGE_CONF_PATH "/etc/selinux/semanage.conf"
|
{
|
||||||
|
- if (private_semanage_conf_path)
|
||||||
#include <string.h>
|
|
||||||
#include <selinux/selinux.h>
|
|
||||||
static char *private_selinux_path = NULL;
|
|
||||||
+static char *private_semanage_conf_path = NULL;
|
|
||||||
static char *private_file_context_path = NULL;
|
|
||||||
static char *private_file_context_local_path = NULL;
|
|
||||||
static char *private_file_context_homedir_path = NULL;
|
|
||||||
@@ -52,6 +54,7 @@ static char *private_policy_root = NULL;
|
|
||||||
|
|
||||||
void semanage_free_root() {
|
|
||||||
free(private_selinux_path); private_selinux_path = NULL;
|
|
||||||
+ free(private_semanage_conf_path); private_semanage_conf_path = NULL;
|
|
||||||
free(private_file_context_path); private_file_context_path = NULL;
|
|
||||||
free(private_file_context_local_path); private_file_context_local_path = NULL;
|
|
||||||
free(private_file_context_homedir_path); private_file_context_homedir_path = NULL;
|
|
||||||
@@ -68,6 +71,10 @@ int semanage_set_root(const char *path) {
|
|
||||||
goto error;
|
|
||||||
}
|
|
||||||
|
|
||||||
+ if ( asprintf(&private_semanage_conf_path, "%s/%s", path, SEMANAGE_CONF_PATH) < 0 ) {
|
|
||||||
+ goto error;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
if ( asprintf(&private_file_context_path, "%s/%s", path, selinux_file_context_path()) < 0 ) {
|
|
||||||
goto error;
|
|
||||||
}
|
|
||||||
@@ -171,6 +178,21 @@ const char *semanage_selinux_path(void) {
|
|
||||||
return selinux_path();
|
|
||||||
}
|
|
||||||
|
|
||||||
+/* Return a fully-qualified path + filename to the semanage
|
|
||||||
+ * configuration file. The caller must not alter the string returned
|
|
||||||
+ * (and hence why this function return type is const).
|
|
||||||
+ *
|
|
||||||
+ */
|
|
||||||
+
|
|
||||||
+const char *semanage_conf_path(void)
|
|
||||||
+{
|
|
||||||
+ if (private_semanage_conf_path &&
|
+ if (private_semanage_conf_path &&
|
||||||
+ access(private_semanage_conf_path, R_OK) == 0)
|
+ access(private_semanage_conf_path, R_OK) == 0)
|
||||||
+ return private_semanage_conf_path;
|
return private_semanage_conf_path;
|
||||||
+
|
|
||||||
+ return SEMANAGE_CONF_PATH;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
semanage_handle_t *semanage_handle_create(void)
|
|
||||||
{
|
|
||||||
semanage_handle_t *sh = NULL;
|
|
||||||
diff --git a/libsemanage/src/handle.h b/libsemanage/src/handle.h
|
|
||||||
index 723d811..bb12594 100644
|
|
||||||
--- a/libsemanage/src/handle.h
|
|
||||||
+++ b/libsemanage/src/handle.h
|
|
||||||
@@ -105,6 +105,8 @@ struct semanage_handle {
|
|
||||||
dbase_config_t dbase[DBASE_COUNT];
|
|
||||||
};
|
|
||||||
|
|
||||||
+const char *semanage_conf_path(void);
|
return SEMANAGE_CONF_PATH;
|
||||||
+
|
|
||||||
/* === Local modifications === */
|
|
||||||
static inline
|
|
||||||
dbase_config_t * semanage_user_base_dbase_local(semanage_handle_t * handle)
|
|
||||||
diff --git a/libsemanage/src/semanage_store.c b/libsemanage/src/semanage_store.c
|
|
||||||
index a223aa7..0e7b71a 100644
|
|
||||||
--- a/libsemanage/src/semanage_store.c
|
|
||||||
+++ b/libsemanage/src/semanage_store.c
|
|
||||||
@@ -262,18 +262,6 @@ const char *semanage_path(enum semanage_store_defs store,
|
|
||||||
return semanage_paths[store][path_name];
|
|
||||||
}
|
|
||||||
|
|
||||||
-/* Return a fully-qualified path + filename to the semanage
|
|
||||||
- * configuration file. The caller must not alter the string returned
|
|
||||||
- * (and hence why this function return type is const).
|
|
||||||
- *
|
|
||||||
- * This is going to be hard coded to /etc/selinux/semanage.conf for
|
|
||||||
- * the time being. FIXME
|
|
||||||
- */
|
|
||||||
-const char *semanage_conf_path(void)
|
|
||||||
-{
|
|
||||||
- return "/etc/selinux/semanage.conf";
|
|
||||||
-}
|
|
||||||
-
|
|
||||||
/**************** functions that create module store ***************/
|
|
||||||
|
|
||||||
/* Check that the semanage store exists. If 'create' is non-zero then
|
|
||||||
diff --git a/libsemanage/src/semanage_store.h b/libsemanage/src/semanage_store.h
|
|
||||||
index b451308..98e011d 100644
|
|
||||||
--- a/libsemanage/src/semanage_store.h
|
|
||||||
+++ b/libsemanage/src/semanage_store.h
|
|
||||||
@@ -66,7 +66,6 @@ enum semanage_sandbox_defs {
|
|
||||||
/* FIXME: this needs to be made a module store specific init and the
|
|
||||||
* global configuration moved to another file.
|
|
||||||
*/
|
|
||||||
-const char *semanage_conf_path(void);
|
|
||||||
int semanage_check_init(const char *root);
|
|
||||||
|
|
||||||
extern const char *semanage_fname(enum semanage_sandbox_defs file_enum);
|
|
||||||
|
@ -4,13 +4,13 @@
|
|||||||
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print (get_python_lib(1))")}
|
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print (get_python_lib(1))")}
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%define libsepolver 2.1.4-5
|
%define libsepolver 2.1.5-1
|
||||||
%define libselinuxver 2.1.9-2
|
%define libselinuxver 2.1.10-1
|
||||||
|
|
||||||
Summary: SELinux binary policy manipulation library
|
Summary: SELinux binary policy manipulation library
|
||||||
Name: libsemanage
|
Name: libsemanage
|
||||||
Version: 2.1.6
|
Version: 2.1.7
|
||||||
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,16 @@ rm -rf ${RPM_BUILD_ROOT}
|
|||||||
%endif # if with_python3
|
%endif # if with_python3
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Mar 29 2012 Dan Walsh <dwalsh@redhat.com> - 2.1.7-1
|
||||||
|
- Update to upstream
|
||||||
|
* Alternate path for semanage.conf
|
||||||
|
* do not link against libpython, this is considered bad in Debian
|
||||||
|
* Allow to build for several ruby version
|
||||||
|
* fallback-user-level
|
||||||
|
|
||||||
|
* Wed Feb 15 2012 Dan Walsh <dwalsh@redhat.com> - 2.1.6-3
|
||||||
|
- Check in correct patch.
|
||||||
|
|
||||||
* Fri Jan 6 2012 Dan Walsh <dwalsh@redhat.com> - 2.1.6-2
|
* Fri Jan 6 2012 Dan Walsh <dwalsh@redhat.com> - 2.1.6-2
|
||||||
- Add patch form Xin Ouyang to make library use private semanage.conf
|
- Add patch form Xin Ouyang to make library use private semanage.conf
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user