summaryrefslogtreecommitdiff
path: root/source4/ntptr/simple_ldb
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>2009-10-12 19:09:18 +0200
committerMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>2009-10-14 10:50:43 +0200
commite9686985cbf1f5234d9e9731176b1eb4e02911e8 (patch)
tree0426dc196c4223079f11c29c465b631e7d0eecdd /source4/ntptr/simple_ldb
parentccfbe7bcb1f09530091ad6c986eae19a378bd2ea (diff)
downloadsamba-e9686985cbf1f5234d9e9731176b1eb4e02911e8.tar.gz
samba-e9686985cbf1f5234d9e9731176b1eb4e02911e8.tar.bz2
samba-e9686985cbf1f5234d9e9731176b1eb4e02911e8.zip
s4: Changes the old occurences of "lp_realm" in "lp_dnsdomain" where needed
For KERBEROS applications the realm should be upcase (function "lp_realm") but for DNS ones it should be used lowcase (function "lp_dnsdomain"). This patch implements the use of both in the right way.
Diffstat (limited to 'source4/ntptr/simple_ldb')
-rw-r--r--source4/ntptr/simple_ldb/ntptr_simple_ldb.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/source4/ntptr/simple_ldb/ntptr_simple_ldb.c b/source4/ntptr/simple_ldb/ntptr_simple_ldb.c
index 601f7902df..e179f52926 100644
--- a/source4/ntptr/simple_ldb/ntptr_simple_ldb.c
+++ b/source4/ntptr/simple_ldb/ntptr_simple_ldb.c
@@ -208,12 +208,14 @@ static WERROR sptr_GetPrintServerData(struct ntptr_GenericHandle *server, TALLOC
r->out.data->binary = blob;
return WERR_OK;
} else if (strcmp("DNSMachineName", r->in.value_name) == 0) {
- if (!lp_realm(server->ntptr->lp_ctx)) return WERR_INVALID_PARAM;
+ const char *dnsdomain = lp_dnsdomain(server->ntptr->lp_ctx);
+
+ if (dnsdomain == NULL) return WERR_INVALID_PARAM;
*r->out.type = REG_SZ;
r->out.data->string = talloc_asprintf(mem_ctx, "%s.%s",
- lp_netbios_name(server->ntptr->lp_ctx),
- lp_realm(server->ntptr->lp_ctx));
+ lp_netbios_name(server->ntptr->lp_ctx),
+ dnsdomain);
W_ERROR_HAVE_NO_MEMORY(r->out.data->string);
return WERR_OK;
}