From 5f962d9b986e163bd3cceed6f9a9eebb61fdff27 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Wed, 23 Jan 2008 12:03:51 +0100 Subject: Fix get_trust_creds() to return always an upper-cased krb5 principal (this fixes winbind krb5 session at least with heimdal). Guenther (This used to be commit 9cf3a98eacea2dd07f89245f147e002b3f49482e) --- source3/winbindd/winbindd_cm.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'source3') diff --git a/source3/winbindd/winbindd_cm.c b/source3/winbindd/winbindd_cm.c index ef159f0670..ac122fba41 100644 --- a/source3/winbindd/winbindd_cm.c +++ b/source3/winbindd/winbindd_cm.c @@ -694,11 +694,15 @@ static NTSTATUS get_trust_creds(const struct winbindd_domain *domain, /* this is at least correct when domain is our domain, * which is the only case, when this is currently used: */ - if ((machine_krb5_principal != NULL) && - (asprintf(machine_krb5_principal, "%s$@%s", account_name, - domain->alt_name) == -1)) + if (machine_krb5_principal != NULL) { - return NT_STATUS_NO_MEMORY; + if (asprintf(machine_krb5_principal, "%s$@%s", + account_name, domain->alt_name) == -1) + { + return NT_STATUS_NO_MEMORY; + } + + strupper_m(*machine_krb5_principal); } return NT_STATUS_OK; -- cgit