- Rebuild to fix segfault on x86 platforms, swigify on each build
This commit is contained in:
parent
3068364d58
commit
a65d30f4d2
@ -1,6 +1,23 @@
|
||||
diff --exclude-from=exclude -N -u -r nsalibsemanage/include/semanage/handle.h libsemanage-2.0.3/include/semanage/handle.h
|
||||
--- nsalibsemanage/include/semanage/handle.h 2007-07-16 14:20:37.000000000 -0400
|
||||
+++ libsemanage-2.0.3/include/semanage/handle.h 2007-08-11 06:41:11.000000000 -0400
|
||||
@@ -69,6 +69,13 @@
|
||||
* 1 for yes, 0 for no (default) */
|
||||
void semanage_set_create_store(semanage_handle_t * handle, int create_store);
|
||||
|
||||
+/* set whether to generate homedir file context
|
||||
+ * 1 for yes (default), 0 for no */
|
||||
+void semanage_set_rebuild_file_context(semanage_handle_t * handle, int do_rebuild_file_context);
|
||||
+
|
||||
+/* Set whether or not to disable dontaudits upon commit */
|
||||
+void semanage_set_disable_dontaudit(semanage_handle_t * handle, int disable_dontaudit);
|
||||
+
|
||||
/* Check whether policy is managed via libsemanage on this system.
|
||||
* Must be called prior to trying to connect.
|
||||
* Return 1 if policy is managed via libsemanage on this system,
|
||||
diff --exclude-from=exclude -N -u -r nsalibsemanage/Makefile libsemanage-2.0.3/Makefile
|
||||
--- nsalibsemanage/Makefile 2007-02-20 08:43:09.000000000 -0500
|
||||
+++ libsemanage-2.0.3/Makefile 2007-06-26 05:33:32.000000000 -0400
|
||||
--- nsalibsemanage/Makefile 2007-07-16 14:20:39.000000000 -0400
|
||||
+++ libsemanage-2.0.3/Makefile 2007-08-11 06:40:28.000000000 -0400
|
||||
@@ -1,6 +1,9 @@
|
||||
all:
|
||||
$(MAKE) -C src all
|
||||
@ -11,3 +28,93 @@ diff --exclude-from=exclude -N -u -r nsalibsemanage/Makefile libsemanage-2.0.3/M
|
||||
pywrap:
|
||||
$(MAKE) -C src pywrap
|
||||
|
||||
diff --exclude-from=exclude -N -u -r nsalibsemanage/src/handle.c libsemanage-2.0.3/src/handle.c
|
||||
--- nsalibsemanage/src/handle.c 2007-07-16 14:20:38.000000000 -0400
|
||||
+++ libsemanage-2.0.3/src/handle.c 2007-08-11 06:41:31.000000000 -0400
|
||||
@@ -68,6 +68,7 @@
|
||||
/* By default do not create store */
|
||||
sh->create_store = 0;
|
||||
|
||||
+ sh->do_rebuild_file_context = 1;
|
||||
/* Set timeout: some default value for now, later use config */
|
||||
sh->timeout = SEMANAGE_COMMIT_READ_WAIT;
|
||||
|
||||
@@ -100,6 +101,15 @@
|
||||
return;
|
||||
}
|
||||
|
||||
+void semanage_set_rebuild_file_context(semanage_handle_t * sh, int do_rebuild_file_context)
|
||||
+{
|
||||
+
|
||||
+ assert(sh != NULL);
|
||||
+
|
||||
+ sh->do_rebuild_file_context = do_rebuild_file_context;
|
||||
+ return;
|
||||
+}
|
||||
+
|
||||
void semanage_set_create_store(semanage_handle_t * sh, int create_store)
|
||||
{
|
||||
|
||||
@@ -109,6 +119,14 @@
|
||||
return;
|
||||
}
|
||||
|
||||
+void semanage_set_disable_dontaudit(semanage_handle_t * sh, int disable_dontaudit)
|
||||
+{
|
||||
+ assert(sh != NULL);
|
||||
+
|
||||
+ sepol_set_disable_dontaudit(sh->sepolh, disable_dontaudit);
|
||||
+ return;
|
||||
+}
|
||||
+
|
||||
int semanage_is_connected(semanage_handle_t * sh)
|
||||
{
|
||||
assert(sh != NULL);
|
||||
diff --exclude-from=exclude -N -u -r nsalibsemanage/src/handle.h libsemanage-2.0.3/src/handle.h
|
||||
--- nsalibsemanage/src/handle.h 2007-07-16 14:20:38.000000000 -0400
|
||||
+++ libsemanage-2.0.3/src/handle.h 2007-08-11 06:40:28.000000000 -0400
|
||||
@@ -58,6 +58,7 @@
|
||||
int is_connected;
|
||||
int is_in_transaction;
|
||||
int do_reload; /* whether to reload policy after commit */
|
||||
+ int do_rebuild_file_context; /* whether to generate homedircontext */
|
||||
int do_rebuild; /* whether to rebuild policy if there were no changes */
|
||||
int modules_modified;
|
||||
int create_store; /* whether to create the store if it does not exist
|
||||
diff --exclude-from=exclude -N -u -r nsalibsemanage/src/libsemanage.map libsemanage-2.0.3/src/libsemanage.map
|
||||
--- nsalibsemanage/src/libsemanage.map 2007-07-16 14:20:38.000000000 -0400
|
||||
+++ libsemanage-2.0.3/src/libsemanage.map 2007-08-11 06:40:28.000000000 -0400
|
||||
@@ -9,10 +9,11 @@
|
||||
semanage_module_list_nth; semanage_module_get_name;
|
||||
semanage_module_get_version; semanage_select_store;
|
||||
semanage_reload_policy; semanage_set_reload; semanage_set_rebuild;
|
||||
+ semanage_set_rebuild_file_context;
|
||||
semanage_user_*; semanage_bool_*; semanage_seuser_*;
|
||||
semanage_iface_*; semanage_port_*; semanage_context_*;
|
||||
semanage_node_*;
|
||||
semanage_fcontext_*; semanage_access_check; semanage_set_create_store;
|
||||
- semanage_is_connected;
|
||||
+ semanage_is_connected; semanage_set_disable_dontaudit;
|
||||
local: *;
|
||||
};
|
||||
diff --exclude-from=exclude -N -u -r nsalibsemanage/src/semanage_store.c libsemanage-2.0.3/src/semanage_store.c
|
||||
--- nsalibsemanage/src/semanage_store.c 2007-07-16 14:20:38.000000000 -0400
|
||||
+++ libsemanage-2.0.3/src/semanage_store.c 2007-08-11 06:40:28.000000000 -0400
|
||||
@@ -1120,7 +1120,7 @@
|
||||
|
||||
skip_reload:
|
||||
|
||||
- if ((r =
|
||||
+ if (sh->do_rebuild_file_context && (r =
|
||||
semanage_exec_prog(sh, sh->conf->setfiles, store_pol,
|
||||
store_fc)) != 0) {
|
||||
ERR(sh, "setfiles returned error code %d.", r);
|
||||
@@ -1262,7 +1262,7 @@
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
- if ((retval =
|
||||
+ if (sh->do_rebuild_file_context && (retval =
|
||||
semanage_exec_prog(sh, sh->conf->genhomedircon,
|
||||
sh->conf->store_path, "")) != 0) {
|
||||
ERR(sh, "genhomedircon returned error code %d.", retval);
|
||||
|
@ -3,7 +3,7 @@
|
||||
Summary: SELinux binary policy manipulation library
|
||||
Name: libsemanage
|
||||
Version: 2.0.3
|
||||
Release: 4%{?dist}
|
||||
Release: 5%{?dist}
|
||||
License: GPL
|
||||
Group: System Environment/Libraries
|
||||
Source: http://www.nsa.gov/selinux/archives/libsemanage-%{version}.tgz
|
||||
|
Loading…
Reference in New Issue
Block a user