2007-11-30 20:08:17 +00:00
|
|
|
diff --exclude-from=exclude -N -u -r nsalibsemanage/src/genhomedircon.c libsemanage-2.0.14/src/genhomedircon.c
|
|
|
|
--- nsalibsemanage/src/genhomedircon.c 2007-10-05 13:09:53.000000000 -0400
|
|
|
|
+++ libsemanage-2.0.14/src/genhomedircon.c 2007-11-29 12:31:13.000000000 -0500
|
|
|
|
@@ -790,7 +790,7 @@
|
|
|
|
homedir_context_tpl = make_template(s, &HOME_DIR_PRED);
|
|
|
|
homeroot_context_tpl = make_template(s, &HOME_ROOT_PRED);
|
|
|
|
user_context_tpl = make_template(s, &USER_CONTEXT_PRED);
|
|
|
|
- if (!homedir_context_tpl || !homeroot_context_tpl || !user_context_tpl) {
|
|
|
|
+ if (!homedir_context_tpl || !homeroot_context_tpl) {
|
|
|
|
retval = STATUS_ERR;
|
|
|
|
goto done;
|
|
|
|
}
|
|
|
|
@@ -828,16 +828,18 @@
|
2007-09-27 00:20:09 +00:00
|
|
|
|
2007-11-30 20:08:17 +00:00
|
|
|
ustr_sc_free(&temp);
|
|
|
|
}
|
|
|
|
- if (write_user_context(s, out, user_context_tpl,
|
|
|
|
- ".*", s->fallback_user,
|
|
|
|
- s->fallback_user_prefix) != STATUS_SUCCESS) {
|
|
|
|
- retval = STATUS_ERR;
|
|
|
|
- goto done;
|
|
|
|
- }
|
|
|
|
+ if (user_context_tpl) {
|
|
|
|
+ if (write_user_context(s, out, user_context_tpl,
|
|
|
|
+ ".*", s->fallback_user,
|
|
|
|
+ s->fallback_user_prefix) != STATUS_SUCCESS) {
|
|
|
|
+ retval = STATUS_ERR;
|
|
|
|
+ goto done;
|
|
|
|
+ }
|
2007-09-27 00:20:09 +00:00
|
|
|
|
2007-11-30 20:08:17 +00:00
|
|
|
- if (write_gen_home_dir_context(s, out, user_context_tpl,
|
|
|
|
- homedir_context_tpl) != STATUS_SUCCESS) {
|
|
|
|
- retval = STATUS_ERR;
|
|
|
|
+ if (write_gen_home_dir_context(s, out, user_context_tpl,
|
|
|
|
+ homedir_context_tpl) != STATUS_SUCCESS) {
|
|
|
|
+ retval = STATUS_ERR;
|
|
|
|
+ }
|
|
|
|
}
|
2007-09-27 00:20:09 +00:00
|
|
|
|
2007-11-30 20:08:17 +00:00
|
|
|
done:
|
|
|
|
diff --exclude-from=exclude -N -u -r nsalibsemanage/src/handle.c libsemanage-2.0.14/src/handle.c
|
|
|
|
--- nsalibsemanage/src/handle.c 2007-08-20 19:15:37.000000000 -0400
|
|
|
|
+++ libsemanage-2.0.14/src/handle.c 2007-11-10 06:21:33.000000000 -0500
|
|
|
|
@@ -27,6 +27,7 @@
|
|
|
|
#include <assert.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
+#include <string.h>
|
|
|
|
#include <sys/time.h>
|
2007-09-26 20:51:43 +00:00
|
|
|
|
2007-11-30 20:08:17 +00:00
|
|
|
#include "direct_api.h"
|
|
|
|
@@ -131,7 +132,7 @@
|
|
|
|
|
|
|
|
/* This just sets the storename to what the user requests, no
|
|
|
|
verification of existance will be done until connect */
|
|
|
|
- sh->conf->store_path = storename;
|
|
|
|
+ sh->conf->store_path = strdup(storename);
|
|
|
|
sh->conf->store_type = storetype;
|
|
|
|
|
|
|
|
return;
|