summaryrefslogtreecommitdiffstats
path: root/src/providers/ldap/sdap_child_helpers.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/providers/ldap/sdap_child_helpers.c')
-rw-r--r--src/providers/ldap/sdap_child_helpers.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/providers/ldap/sdap_child_helpers.c b/src/providers/ldap/sdap_child_helpers.c
index 5a15e661..d0f6caeb 100644
--- a/src/providers/ldap/sdap_child_helpers.c
+++ b/src/providers/ldap/sdap_child_helpers.c
@@ -458,6 +458,12 @@ int setup_child(struct sdap_id_ctx *ctx)
const char *mech;
unsigned v;
FILE *debug_filep;
+ const char *realm;
+
+ realm = dp_opt_get_string(ctx->opts->basic, SDAP_SASL_REALM);
+ if (!realm) {
+ realm = dp_opt_get_string(ctx->opts->basic, SDAP_KRB5_REALM);
+ }
mech = dp_opt_get_string(ctx->opts->basic,
SDAP_SASL_MECH);
@@ -468,8 +474,7 @@ int setup_child(struct sdap_id_ctx *ctx)
if (mech && (strcasecmp(mech, "GSSAPI") == 0)) {
ret = sss_krb5_verify_keytab(dp_opt_get_string(ctx->opts->basic,
SDAP_SASL_AUTHID),
- dp_opt_get_string(ctx->opts->basic,
- SDAP_KRB5_REALM),
+ realm,
dp_opt_get_string(ctx->opts->basic,
SDAP_KRB5_KEYTAB));