summaryrefslogtreecommitdiff
path: root/source4/lib/credentials.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib/credentials.c')
-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;
}