diff options
author | Andrew Bartlett <abartlet@samba.org> | 2005-05-10 09:51:55 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:16:35 -0500 |
commit | 69f3a934d78748d22cbfd8eccd16b3100a1c13e7 (patch) | |
tree | 7c5b6eac594c6a2f1a137f87242e0e65d7a1f1af /source4/auth | |
parent | 493cab3dbc8ae3587f334eaf297646f7051e7781 (diff) | |
download | samba-69f3a934d78748d22cbfd8eccd16b3100a1c13e7.tar.gz samba-69f3a934d78748d22cbfd8eccd16b3100a1c13e7.tar.bz2 samba-69f3a934d78748d22cbfd8eccd16b3100a1c13e7.zip |
r6700: Upper case realms in kerberos-specific parts of the code, as this is
no longer done globally.
This keeps MIT client libraries happy, because otherwise the windows
KDC will return a different case to what was requested.
Andrew Bartlett
(This used to be commit 9098b9321f938473c367f906cfe2f001ca1d8e6a)
Diffstat (limited to 'source4/auth')
-rw-r--r-- | source4/auth/gensec/gensec_krb5.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/source4/auth/gensec/gensec_krb5.c b/source4/auth/gensec/gensec_krb5.c index 93d82a33a1..c850d93fce 100644 --- a/source4/auth/gensec/gensec_krb5.c +++ b/source4/auth/gensec/gensec_krb5.c @@ -284,7 +284,12 @@ static NTSTATUS gensec_krb5_start(struct gensec_security *gensec_security) } if (lp_realm() && *lp_realm()) { - ret = krb5_set_default_realm(gensec_krb5_state->context, lp_realm()); + char *upper_realm = strupper_talloc(gensec_krb5_state, lp_realm()); + if (!upper_realm) { + DEBUG(1,("gensec_krb5_start: could not uppercase realm: %s\n", lp_realm())); + return NT_STATUS_NO_MEMORY; + } + ret = krb5_set_default_realm(gensec_krb5_state->context, upper_realm); if (ret) { DEBUG(1,("gensec_krb5_start: krb5_set_default_realm failed (%s)\n", error_message(ret))); return NT_STATUS_INTERNAL_ERROR; |