diff options
author | Gerald W. Carter <jerry@samba.org> | 2008-06-03 11:18:44 -0500 |
---|---|---|
committer | Gerald W. Carter <jerry@samba.org> | 2008-06-03 11:21:02 -0500 |
commit | dd7cf3464d36e1e6d622371ff3f05b1eac3f381d (patch) | |
tree | c20dc49272e78a8f920d30163ce37b2c227fa189 /source3/winbindd | |
parent | 175909f4e1df51a1e00db1804372db5920c5f209 (diff) | |
download | samba-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)
Diffstat (limited to 'source3/winbindd')
-rw-r--r-- | source3/winbindd/winbindd_cm.c | 8 |
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; } |