summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-01-23 12:03:51 +0100
committerGünther Deschner <gd@samba.org>2008-01-23 12:05:01 +0100
commit5f962d9b986e163bd3cceed6f9a9eebb61fdff27 (patch)
tree45cdd7df22e6150864dda00e4fe8e3440ae2938d /source3
parent5b35ecd930dc6267821c7a3d8b3a90c680ab71b1 (diff)
downloadsamba-5f962d9b986e163bd3cceed6f9a9eebb61fdff27.tar.gz
samba-5f962d9b986e163bd3cceed6f9a9eebb61fdff27.tar.bz2
samba-5f962d9b986e163bd3cceed6f9a9eebb61fdff27.zip
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)
Diffstat (limited to 'source3')
-rw-r--r--source3/winbindd/winbindd_cm.c12
1 files changed, 8 insertions, 4 deletions
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;