Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ad: refresh root domain when read directly #7251

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/providers/ad/ad_subdomains.c
Original file line number Diff line number Diff line change
Expand Up @@ -1395,7 +1395,7 @@ struct ad_get_root_domain_state {
static void ad_get_root_domain_done(struct tevent_req *subreq);
static void ad_check_root_domain_done(struct tevent_req *subreq);
static errno_t
ad_get_root_domain_refresh(struct ad_get_root_domain_state *state);
ad_get_root_domain_refresh(struct ad_get_root_domain_state *state, bool refresh);

struct tevent_req *
ad_check_domain_send(TALLOC_CTX *mem_ctx,
Expand Down Expand Up @@ -1582,7 +1582,7 @@ static void ad_get_root_domain_done(struct tevent_req *subreq)
return;
}

ret = ad_get_root_domain_refresh(state);
ret = ad_get_root_domain_refresh(state, false);
if (ret != EOK) {
DEBUG(SSSDBG_OP_FAILURE, "ad_get_root_domain_refresh() failed.\n");
}
Expand Down Expand Up @@ -1682,7 +1682,7 @@ static void ad_check_root_domain_done(struct tevent_req *subreq)

state->reply_count = 1;

ret = ad_get_root_domain_refresh(state);
ret = ad_get_root_domain_refresh(state, true);
if (ret != EOK) {
DEBUG(SSSDBG_OP_FAILURE, "ad_get_root_domain_refresh() failed.\n");
}
Expand All @@ -1697,7 +1697,7 @@ static void ad_check_root_domain_done(struct tevent_req *subreq)
}

static errno_t
ad_get_root_domain_refresh(struct ad_get_root_domain_state *state)
ad_get_root_domain_refresh(struct ad_get_root_domain_state *state, bool refresh)
{
struct sss_domain_info *root_domain;
bool has_changes;
Expand All @@ -1713,7 +1713,7 @@ ad_get_root_domain_refresh(struct ad_get_root_domain_state *state)
goto done;
}

if (has_changes) {
if (has_changes || refresh) {
ret = ad_subdom_reinit(state->sd_ctx);
if (ret != EOK) {
DEBUG(SSSDBG_OP_FAILURE, "Could not reinitialize subdomains\n");
Expand Down
Loading