summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerald W. Carter <jerry@samba.org>2008-06-03 11:18:44 -0500
committerGerald W. Carter <jerry@samba.org>2008-06-03 11:21:02 -0500
commitdd7cf3464d36e1e6d622371ff3f05b1eac3f381d (patch)
treec20dc49272e78a8f920d30163ce37b2c227fa189
parent175909f4e1df51a1e00db1804372db5920c5f209 (diff)
downloadsamba-dd7cf3464d36e1e6d622371ff3f05b1eac3f381d.tar.gz
samba-dd7cf3464d36e1e6d622371ff3f05b1eac3f381d.tar.bz2
samba-dd7cf3464d36e1e6d622371ff3f05b1eac3f381d.zip
winbindd_cm: Replace the use of lp_realm() with our_domain->alt_name.
Reduce the use of config parameters with run time information after discussion with Guenther. (This used to be commit 57d596395db287301eefd34e62c9aaf857c34c69)
-rw-r--r--source3/winbindd/winbindd_cm.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/source3/winbindd/winbindd_cm.c b/source3/winbindd/winbindd_cm.c
index a1027cec97..312d30371f 100644
--- a/source3/winbindd/winbindd_cm.c
+++ b/source3/winbindd/winbindd_cm.c
@@ -710,8 +710,14 @@ static NTSTATUS get_trust_creds(const struct winbindd_domain *domain,
if (machine_krb5_principal != NULL)
{
+ struct winbindd_domain *our_domain = find_our_domain();
+
+ if (!our_domain) {
+ return NT_STATUS_CANT_ACCESS_DOMAIN_INFO;
+ }
+
if (asprintf(machine_krb5_principal, "%s$@%s",
- account_name, lp_realm()) == -1)
+ account_name, our_domain->alt_name) == -1)
{
return NT_STATUS_NO_MEMORY;
}