From 28bd9719e527d4c127df51567636dc71160b4f59 Mon Sep 17 00:00:00 2001 From: Matthias Dieter Wallnöfer Date: Mon, 15 Feb 2010 10:29:47 +0100 Subject: 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. --- source4/param/provision.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'source4/param') 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", -- cgit