summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/param/param_functions.c1
-rw-r--r--source3/param/loadparm.c18
2 files changed, 6 insertions, 13 deletions
diff --git a/lib/param/param_functions.c b/lib/param/param_functions.c
index eb701902dc..eb75f7da69 100644
--- a/lib/param/param_functions.c
+++ b/lib/param/param_functions.c
@@ -237,6 +237,7 @@ FN_GLOBAL_BOOL(winbind_use_default_domain, bWinbindUseDefaultDomain)
FN_GLOBAL_BOOL(wins_dns_proxy, bWINSdnsProxy)
FN_GLOBAL_BOOL(wins_proxy, bWINSproxy)
FN_GLOBAL_CONST_STRING(afs_username_map, szAfsUsernameMap)
+FN_GLOBAL_CONST_STRING(ctdbd_socket, ctdbdSocket)
FN_GLOBAL_CONST_STRING(dedicated_keytab_file, szDedicatedKeytabFile)
FN_GLOBAL_CONST_STRING(dnsdomain, szRealm_lower)
FN_GLOBAL_CONST_STRING(dns_forwarder, dns_forwarder)
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index 00edc3f3d7..2a9900b168 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -4892,7 +4892,12 @@ static void init_globals(bool reinit_globals)
string_set(&Globals.szCupsServer, "");
string_set(&Globals.szIPrintServer, "");
+#ifdef CLUSTER_SUPPORT
+ string_set(&Globals.ctdbdSocket, CTDB_PATH);
+#else
string_set(&Globals.ctdbdSocket, "");
+#endif
+
Globals.szClusterAddresses = NULL;
Globals.clustering = false;
Globals.ctdb_timeout = 0;
@@ -5043,7 +5048,6 @@ char *lp_ ## fn_name(TALLOC_CTX *ctx,int i) {return(lp_string((ctx), (LP_SNUM_OK
static FN_GLOBAL_BOOL(domain_logons, bDomainLogons)
static FN_GLOBAL_BOOL(_readraw, bReadRaw)
static FN_GLOBAL_BOOL(_writeraw, bWriteRaw)
-static FN_GLOBAL_CONST_STRING(_ctdbd_socket, ctdbdSocket)
static FN_GLOBAL_INTEGER(_server_role, ServerRole)
/* If lp_statedir() and lp_cachedir() are explicitely set during the
@@ -9405,15 +9409,3 @@ int lp_server_role(void)
lp_domain_logons(),
lp_domain_master_true_or_auto());
}
-
-const char *lp_ctdbd_socket(void)
-{
- const char *result = lp__ctdbd_socket();
-
-#ifdef CLUSTER_SUPPORT
- if ((result == NULL) || (*result == '\0')) {
- return CTDB_PATH;
- }
-#endif
- return result;
-}