summaryrefslogtreecommitdiff
path: root/source4/param
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>2010-02-15 10:29:47 +0100
committerMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>2010-02-15 10:33:35 +0100
commit28bd9719e527d4c127df51567636dc71160b4f59 (patch)
treeb6ae69ce4a0fc756cf415557274065abc7a1901a /source4/param
parent05425fcf14f0695e5e230a698885203cc7c7ab2b (diff)
downloadsamba-28bd9719e527d4c127df51567636dc71160b4f59.tar.gz
samba-28bd9719e527d4c127df51567636dc71160b4f59.tar.bz2
samba-28bd9719e527d4c127df51567636dc71160b4f59.zip
s4:provision.c - "provsion_store_self_join" - don't set the realm if it's NULL
The realm can be NULL when this function is called by "libnet_Join_primary_domain". This seems to be a valid value since "libnet_JoinDomain" is allowed to return an empty realm if we are not in a ADS domain.
Diffstat (limited to 'source4/param')
-rw-r--r--source4/param/provision.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source4/param/provision.c b/source4/param/provision.c
index 920a5d8639..9191400f59 100644
--- a/source4/param/provision.c
+++ b/source4/param/provision.c
@@ -280,8 +280,10 @@ NTSTATUS provision_store_self_join(TALLOC_CTX *mem_ctx, struct loadparm_context
PyLdb_FromLdbContext(ldb));
PyDict_SetItemString(parameters, "domain",
PyString_FromString(settings->domain_name));
- PyDict_SetItemString(parameters, "realm",
- PyString_FromString(settings->realm));
+ if (settings->realm != NULL) {
+ PyDict_SetItemString(parameters, "realm",
+ PyString_FromString(settings->realm));
+ }
PyDict_SetItemString(parameters, "machinepass",
PyString_FromString(settings->machine_password));
PyDict_SetItemString(parameters, "netbiosname",