summaryrefslogtreecommitdiff
path: root/source4/lib
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2005-05-10 09:51:55 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:16:35 -0500
commit69f3a934d78748d22cbfd8eccd16b3100a1c13e7 (patch)
tree7c5b6eac594c6a2f1a137f87242e0e65d7a1f1af /source4/lib
parent493cab3dbc8ae3587f334eaf297646f7051e7781 (diff)
downloadsamba-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/lib')
-rw-r--r--source4/lib/credentials.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source4/lib/credentials.c b/source4/lib/credentials.c
index 7e25fc780b..ed9a9788ab 100644
--- a/source4/lib/credentials.c
+++ b/source4/lib/credentials.c
@@ -175,10 +175,14 @@ char *cli_credentials_get_principal(struct cli_credentials *cred,
cli_credentials_get_realm(cred));
}
+/**
+ * Set the realm for this credentials context, and force it to
+ * uppercase for the sainity of our local kerberos libraries
+ */
BOOL cli_credentials_set_realm(struct cli_credentials *cred, const char *val, enum credentials_obtained obtained)
{
if (obtained >= cred->realm_obtained) {
- cred->realm = talloc_strdup(cred, val);
+ cred->realm = strupper_talloc(cred, val);
cred->realm_obtained = obtained;
return True;
}