Skip to content

Commit 04a8ff0

Browse files
DONOTMERGE: FIXME for AD provider
This commit will be removed when AD provider is ported to new failover.
1 parent 94b8e30 commit 04a8ff0

2 files changed

Lines changed: 24 additions & 7 deletions

File tree

src/providers/ldap/sdap_async_groups.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1778,6 +1778,7 @@ struct tevent_req *sdap_get_groups_send(TALLOC_CTX *memctx,
17781778
/* With AD by default the Global Catalog is used for lookup. But the GC
17791779
* group object might not have full group membership data. To make sure we
17801780
* connect to an LDAP server of the group's domain. */
1781+
/* FIXME: AD use case
17811782
ldap_conn = get_ldap_conn_from_sdom_pvt(state->opts, sdom);
17821783
if (ldap_conn != NULL) {
17831784
state->op = sdap_id_op_create(state, ldap_conn->conn_cache);
@@ -1798,6 +1799,7 @@ struct tevent_req *sdap_get_groups_send(TALLOC_CTX *memctx,
17981799
req);
17991800
return req;
18001801
}
1802+
*/
18011803

18021804
ret = sdap_get_groups_next_base(req);
18031805

@@ -1810,6 +1812,7 @@ struct tevent_req *sdap_get_groups_send(TALLOC_CTX *memctx,
18101812
return req;
18111813
}
18121814

1815+
/*
18131816
static void sdap_get_groups_ldap_connect_done(struct tevent_req *subreq)
18141817
{
18151818
struct tevent_req *req;
@@ -1836,6 +1839,7 @@ static void sdap_get_groups_ldap_connect_done(struct tevent_req *subreq)
18361839
18371840
return;
18381841
}
1842+
*/
18391843

18401844
static errno_t sdap_get_groups_next_base(struct tevent_req *req)
18411845
{

src/providers/ldap/sdap_async_initgroups_ad.c

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ sdap_ad_tokengroups_initgr_mapping_send(TALLOC_CTX *mem_ctx,
447447
struct tevent_req *req = NULL;
448448
struct tevent_req *subreq = NULL;
449449
struct sdap_domain *sdom;
450-
struct ad_id_ctx *subdom_id_ctx;
450+
//struct ad_id_ctx *subdom_id_ctx;
451451
errno_t ret;
452452

453453
req = tevent_req_create(mem_ctx, &state,
@@ -486,6 +486,7 @@ sdap_ad_tokengroups_initgr_mapping_send(TALLOC_CTX *mem_ctx,
486486
}
487487

488488
subdom_id_ctx = talloc_get_type(sdom->pvt, struct ad_id_ctx);
489+
/*
489490
state->op = sdap_id_op_create(state, subdom_id_ctx->ldap_ctx->conn_cache);
490491
if (!state->op) {
491492
DEBUG(SSSDBG_OP_FAILURE, "sdap_id_op_create failed\n");
@@ -498,6 +499,7 @@ sdap_ad_tokengroups_initgr_mapping_send(TALLOC_CTX *mem_ctx,
498499
ret = ENOMEM;
499500
goto immediately;
500501
}
502+
*/
501503

502504
tevent_req_set_callback(subreq,
503505
sdap_ad_tokengroups_initgr_mapping_connect_done,
@@ -528,16 +530,19 @@ sdap_ad_tokengroups_initgr_mapping_connect_done(struct tevent_req *subreq)
528530
struct sdap_ad_tokengroups_initgr_mapping_state);
529531

530532

533+
/*
531534
ret = sdap_id_op_connect_recv(subreq);
532535
talloc_zfree(subreq);
533536
534537
if (ret != EOK) {
535538
tevent_req_error(req, ret);
536539
return;
537540
}
541+
*/
538542

539543
subreq = sdap_get_ad_tokengroups_send(state, state->ev, state->opts,
540-
sdap_id_op_handle(state->op),
544+
// sdap_id_op_handle(state->op),
545+
NULL,
541546
state->username,
542547
state->orig_dn, state->timeout);
543548
if (subreq == NULL) {
@@ -793,7 +798,7 @@ sdap_ad_tokengroups_initgr_posix_send(TALLOC_CTX *mem_ctx,
793798
struct tevent_req *req = NULL;
794799
struct tevent_req *subreq = NULL;
795800
struct sdap_domain *sdom;
796-
struct ad_id_ctx *subdom_id_ctx;
801+
//struct ad_id_ctx *subdom_id_ctx;
797802
errno_t ret;
798803

799804
req = tevent_req_create(mem_ctx, &state,
@@ -832,6 +837,7 @@ sdap_ad_tokengroups_initgr_posix_send(TALLOC_CTX *mem_ctx,
832837
}
833838
}
834839
subdom_id_ctx = talloc_get_type(sdom->pvt, struct ad_id_ctx);
840+
/*
835841
state->op = sdap_id_op_create(state, subdom_id_ctx->ldap_ctx->conn_cache);
836842
if (!state->op) {
837843
DEBUG(SSSDBG_OP_FAILURE, "sdap_id_op_create failed\n");
@@ -844,6 +850,7 @@ sdap_ad_tokengroups_initgr_posix_send(TALLOC_CTX *mem_ctx,
844850
ret = ENOMEM;
845851
goto immediately;
846852
}
853+
*/
847854

848855
tevent_req_set_callback(subreq,
849856
sdap_ad_tokengroups_initgr_posix_sids_connect_done,
@@ -874,16 +881,19 @@ sdap_ad_tokengroups_initgr_posix_sids_connect_done(struct tevent_req *subreq)
874881
struct sdap_ad_tokengroups_initgr_posix_state);
875882

876883

884+
/*
877885
ret = sdap_id_op_connect_recv(subreq);
878886
talloc_zfree(subreq);
879887
880888
if (ret != EOK) {
881889
tevent_req_error(req, ret);
882890
return;
883891
}
892+
*/
884893

885894
subreq = sdap_get_ad_tokengroups_send(state, state->ev, state->opts,
886-
sdap_id_op_handle(state->op),
895+
// sdap_id_op_handle(state->op),
896+
NULL,
887897
state->username, state->orig_dn,
888898
state->timeout);
889899
if (subreq == NULL) {
@@ -1207,6 +1217,7 @@ sdap_ad_get_domain_local_groups_send(TALLOC_CTX *mem_ctx,
12071217
goto fail;
12081218
}
12091219

1220+
/*
12101221
state->op = sdap_id_op_create(state, state->conn->conn_cache);
12111222
if (state->op == NULL) {
12121223
DEBUG(SSSDBG_OP_FAILURE, "sdap_id_op_create failed\n");
@@ -1219,7 +1230,7 @@ sdap_ad_get_domain_local_groups_send(TALLOC_CTX *mem_ctx,
12191230
DEBUG(SSSDBG_OP_FAILURE, "sdap_id_op_connect_send failed.\n");
12201231
goto fail;
12211232
}
1222-
1233+
*/
12231234
tevent_req_set_callback(subreq,
12241235
sdap_ad_get_domain_local_groups_connect_done, req);
12251236

@@ -1240,17 +1251,19 @@ sdap_ad_get_domain_local_groups_connect_done(struct tevent_req *subreq)
12401251
struct sdap_ad_get_domain_local_groups_state *state = tevent_req_data(req,
12411252
struct sdap_ad_get_domain_local_groups_state);
12421253
int ret;
1243-
1254+
/*
12441255
ret = sdap_id_op_connect_recv(subreq);
12451256
talloc_zfree(subreq);
12461257
12471258
if (ret != EOK) {
12481259
tevent_req_error(req, ret);
12491260
return;
12501261
}
1262+
*/
12511263
subreq = rfc2307bis_nested_groups_send(state, state->ev, state->opts,
12521264
state->sysdb, state->dom,
1253-
sdap_id_op_handle(state->op),
1265+
//sdap_id_op_handle(state->op),
1266+
NULL,
12541267
state->search_bases,
12551268
state->groups, state->num_groups,
12561269
state->group_hash, 0);

0 commit comments

Comments
 (0)