[SCM] SAMBA-CTDB repository - branch v3-2-ctdb updated -
build_3.2.11_ctdb.59-9-gf246f1e
Michael Adam
obnox at samba.org
Wed May 6 10:17:16 GMT 2009
The branch, v3-2-ctdb has been updated
via f246f1e45374ef3a499f6322faee35c3e8489583 (commit)
from 8a75176ef775b0222189ad29d19f43488f412d3b (commit)
http://gitweb.samba.org/?p=obnox/samba-ctdb.git;a=shortlog;h=v3-2-ctdb
- Log -----------------------------------------------------------------
commit f246f1e45374ef3a499f6322faee35c3e8489583
Author: Michael Adam <obnox at samba.org>
Date: Wed May 6 02:08:33 2009 +0200
s3:loadparm: handle registry config source in file_list - fixes bug #6320
I.e. does not require smbd restart after changing share default options
in the global registry section with "include = registry".
Michael
-----------------------------------------------------------------------
Summary of changes:
source/param/loadparm.c | 78 ++++++++++++++++++++++++++--------------------
1 files changed, 44 insertions(+), 34 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source/param/loadparm.c b/source/param/loadparm.c
index bbdb52c..d711489 100644
--- a/source/param/loadparm.c
+++ b/source/param/loadparm.c
@@ -665,6 +665,8 @@ static void set_server_role(void);
static void set_default_server_announce_type(void);
static void set_allowed_client_auth(void);
+static void add_to_file_list(const char *fname, const char *subfname);
+
static const struct enum_list enum_protocol[] = {
{PROTOCOL_NT1, "NT1"},
{PROTOCOL_LANMAN2, "LANMAN2"},
@@ -6586,6 +6588,8 @@ static bool process_registry_globals(void)
{
bool ret;
+ add_to_file_list(INCLUDE_REGISTRY_NAME, INCLUDE_REGISTRY_NAME);
+
ret = do_parameter("registry shares", "yes", NULL);
if (!ret) {
return ret;
@@ -6709,45 +6713,51 @@ bool lp_file_list_changed(void)
DEBUG(6, ("lp_file_list_changed()\n"));
- if (lp_config_backend_is_registry()) {
- struct smbconf_ctx *conf_ctx = lp_smbconf_ctx();
-
- if (conf_ctx == NULL) {
- return false;
- }
- if (smbconf_changed(conf_ctx, &conf_last_csn, NULL, NULL)) {
- DEBUGADD(6, ("registry config changed\n"));
- return true;
- }
- }
-
while (f) {
char *n2 = NULL;
time_t mod_time;
- n2 = alloc_sub_basic(get_current_username(),
- current_user_info.domain,
- f->name);
- if (!n2) {
- return false;
- }
- DEBUGADD(6, ("file %s -> %s last mod_time: %s\n",
- f->name, n2, ctime(&f->modtime)));
-
- mod_time = file_modtime(n2);
-
- if (mod_time && ((f->modtime != mod_time) || (f->subfname == NULL) || (strcmp(n2, f->subfname) != 0))) {
- DEBUGADD(6,
- ("file %s modified: %s\n", n2,
- ctime(&mod_time)));
- f->modtime = mod_time;
- SAFE_FREE(f->subfname);
- f->subfname = n2; /* Passing ownership of
- return from alloc_sub_basic
- above. */
- return true;
+ if (strequal(f->name, INCLUDE_REGISTRY_NAME)) {
+ struct smbconf_ctx *conf_ctx = lp_smbconf_ctx();
+
+ if (conf_ctx == NULL) {
+ return false;
+ }
+ if (smbconf_changed(conf_ctx, &conf_last_csn, NULL,
+ NULL))
+ {
+ DEBUGADD(6, ("registry config changed\n"));
+ return true;
+ }
+ } else {
+ n2 = alloc_sub_basic(get_current_username(),
+ current_user_info.domain,
+ f->name);
+ if (!n2) {
+ return false;
+ }
+ DEBUGADD(6, ("file %s -> %s last mod_time: %s\n",
+ f->name, n2, ctime(&f->modtime)));
+
+ mod_time = file_modtime(n2);
+
+ if (mod_time &&
+ ((f->modtime != mod_time) ||
+ (f->subfname == NULL) ||
+ (strcmp(n2, f->subfname) != 0)))
+ {
+ DEBUGADD(6,
+ ("file %s modified: %s\n", n2,
+ ctime(&mod_time)));
+ f->modtime = mod_time;
+ SAFE_FREE(f->subfname);
+ f->subfname = n2; /* Passing ownership of
+ return from alloc_sub_basic
+ above. */
+ return true;
+ }
+ SAFE_FREE(n2);
}
- SAFE_FREE(n2);
f = f->next;
}
return (False);
--
SAMBA-CTDB repository
More information about the samba-cvs
mailing list