From: Gerald W. Carter Date: Tue, 3 Jun 2008 16:18:44 +0000 (-0500) Subject: winbindd_cm: Replace the use of lp_realm() with our_domain->alt_name. X-Git-Tag: samba-4.0.0alpha6~801^2~1179 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=dd7cf3464d36e1e6d622371ff3f05b1eac3f381d;p=thirdparty%2Fsamba.git 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) --- diff --git a/source3/winbindd/winbindd_cm.c b/source3/winbindd/winbindd_cm.c index a1027cec971..312d30371fe 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; }