104 lines
4.1 KiB
Diff
104 lines
4.1 KiB
Diff
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-08-20 19:15:36.000000000 -0400
|
|
+++ libsemanage-2.0.3/include/semanage/handle.h 2007-08-11 06:41:11.000000000 -0400
|
|
@@ -69,6 +69,10 @@
|
|
* 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);
|
|
|
|
diff --exclude-from=exclude -N -u -r nsalibsemanage/Makefile libsemanage-2.0.3/Makefile
|
|
--- 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
|
|
|
|
+swigify:
|
|
+ $(MAKE) -C src swigify
|
|
+
|
|
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-08-20 19:15:37.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)
|
|
{
|
|
|
|
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-08-20 19:15:37.000000000 -0400
|
|
+++ libsemanage-2.0.3/src/libsemanage.map 2007-08-11 06:40:28.000000000 -0400
|
|
@@ -9,6 +9,7 @@
|
|
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_*;
|
|
diff --exclude-from=exclude -N -u -r nsalibsemanage/src/semanage_conf.h libsemanage-2.0.3/src/semanage_conf.h
|
|
--- nsalibsemanage/src/semanage_conf.h 2007-08-23 16:52:25.000000000 -0400
|
|
+++ libsemanage-2.0.3/src/semanage_conf.h 2007-04-25 20:02:29.000000000 -0400
|
|
@@ -37,10 +37,10 @@
|
|
int expand_check;
|
|
int save_previous;
|
|
int save_linked;
|
|
- int disable_genhomedircon;
|
|
mode_t file_mode;
|
|
struct external_prog *load_policy;
|
|
struct external_prog *setfiles;
|
|
+ struct external_prog *genhomedircon;
|
|
struct external_prog *mod_prog, *linked_prog, *kernel_prog;
|
|
} semanage_conf_t;
|
|
|
|
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-08-23 16:52:25.000000000 -0400
|
|
+++ libsemanage-2.0.3/src/semanage_store.c 2007-08-11 06:40:28.000000000 -0400
|
|
@@ -1130,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);
|