Skip to content

Commit

Permalink
AD: Ignore option inherit failure
Browse files Browse the repository at this point in the history
The previous code logged a message indicating that errors are ignored,
but it did not actually ignore errors, and did not properly free
subdom_conf_path if inheriting AD_USE_LDAP failed.

Reviewed-by: Pavel Březina <[email protected]>
Reviewed-by: Tomáš Halman <[email protected]>
  • Loading branch information
PaulSD authored and pbrezina committed Oct 3, 2022
1 parent d91a814 commit 74be536
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/providers/ad/ad_subdomains.c
Original file line number Diff line number Diff line change
Expand Up @@ -335,8 +335,6 @@ ad_subdom_ad_ctx_new(struct be_ctx *be_ctx,
"behavior later on.\n",
id_ctx->ad_options->basic[AD_USE_LDAPS].opt_name,
subdom->name);

return ret;
}

if (dp_opt_get_bool(ad_options->basic, AD_USE_LDAPS)) {
Expand All @@ -347,18 +345,17 @@ ad_subdom_ad_ctx_new(struct be_ctx *be_ctx,
ad_options->id->basic,
be_ctx->cdb, subdom_conf_path,
SDAP_SASL_MECH);
talloc_free(subdom_conf_path);
if (ret != EOK) {
DEBUG(SSSDBG_CRIT_FAILURE,
"Failed to inherit option [%s] to sub-domain [%s]. "
"This error is ignored but might cause issues or unexpected "
"behavior later on.\n",
id_ctx->ad_options->id->basic[SDAP_SASL_MECH].opt_name,
subdom->name);

return ret;
}

talloc_free(subdom_conf_path);

ad_site_override = dp_opt_get_string(ad_options->basic, AD_SITE);

gc_service_name = talloc_asprintf(ad_options, "sd_gc_%s", subdom->name);
Expand Down

0 comments on commit 74be536

Please sign in to comment.