summaryrefslogtreecommitdiffstats
path: root/src/providers/ipa/ipa_common.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/providers/ipa/ipa_common.c')
-rw-r--r--src/providers/ipa/ipa_common.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/providers/ipa/ipa_common.c b/src/providers/ipa/ipa_common.c
index 6ad67845d..2e5047381 100644
--- a/src/providers/ipa/ipa_common.c
+++ b/src/providers/ipa/ipa_common.c
@@ -47,7 +47,6 @@ int ipa_get_options(TALLOC_CTX *memctx,
char *realm;
char *ipa_hostname;
int ret;
- int i;
char hostname[HOST_NAME_MAX + 1];
opts = talloc_zero(memctx, struct ipa_options);
@@ -95,18 +94,13 @@ int ipa_get_options(TALLOC_CTX *memctx,
/* First check whether the realm has been manually specified */
realm = dp_opt_get_string(opts->basic, IPA_KRB5_REALM);
if (!realm) {
- /* No explicit krb5_realm, use the IPA domain */
- realm = talloc_strdup(opts, domain);
+ /* No explicit krb5_realm, use the IPA domain, transform to upper-case */
+ realm = get_uppercase_realm(opts, domain);
if (!realm) {
ret = ENOMEM;
goto done;
}
- /* Use the upper-case IPA domain for the kerberos realm */
- for (i = 0; realm[i]; i++) {
- realm[i] = toupper(realm[i]);
- }
-
ret = dp_opt_set_string(opts->basic, IPA_KRB5_REALM,
realm);
if (ret != EOK) {