Skip to content

Commit 6e21717

Browse files
DONOTMERGE: FIXME for AD provider
This commit will be removed when AD provider is ported to new failover.
1 parent d556e70 commit 6e21717

2 files changed

Lines changed: 30 additions & 12 deletions

File tree

src/providers/ldap/sdap_async_groups.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1727,7 +1727,7 @@ struct sdap_get_groups_state {
17271727
};
17281728

17291729
static errno_t sdap_get_groups_next_base(struct tevent_req *req);
1730-
static void sdap_get_groups_ldap_connect_done(struct tevent_req *subreq);
1730+
//static void sdap_get_groups_ldap_connect_done(struct tevent_req *subreq);
17311731
static void sdap_get_groups_process(struct tevent_req *subreq);
17321732
static void sdap_get_groups_done(struct tevent_req *subreq);
17331733

@@ -1744,9 +1744,9 @@ struct tevent_req *sdap_get_groups_send(TALLOC_CTX *memctx,
17441744
{
17451745
errno_t ret;
17461746
struct tevent_req *req;
1747-
struct tevent_req *subreq;
1747+
//struct tevent_req *subreq;
17481748
struct sdap_get_groups_state *state;
1749-
struct sdap_id_conn_ctx *ldap_conn = NULL;
1749+
//struct sdap_id_conn_ctx *ldap_conn = NULL;
17501750

17511751
req = tevent_req_create(memctx, &state, struct sdap_get_groups_state);
17521752
if (!req) return NULL;
@@ -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: 23 additions & 9 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,
@@ -485,6 +485,7 @@ sdap_ad_tokengroups_initgr_mapping_send(TALLOC_CTX *mem_ctx,
485485
}
486486
}
487487

488+
/*
488489
subdom_id_ctx = talloc_get_type(sdom->pvt, struct ad_id_ctx);
489490
state->op = sdap_id_op_create(state, subdom_id_ctx->ldap_ctx->conn_cache);
490491
if (!state->op) {
@@ -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,
@@ -521,23 +523,26 @@ sdap_ad_tokengroups_initgr_mapping_connect_done(struct tevent_req *subreq)
521523
{
522524
struct sdap_ad_tokengroups_initgr_mapping_state *state = NULL;
523525
struct tevent_req *req = NULL;
524-
int ret;
526+
//int ret;
525527

526528
req = tevent_req_callback_data(subreq, struct tevent_req);
527529
state = tevent_req_data(req,
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,
@@ -831,7 +836,9 @@ sdap_ad_tokengroups_initgr_posix_send(TALLOC_CTX *mem_ctx,
831836
goto immediately;
832837
}
833838
}
839+
/*
834840
subdom_id_ctx = talloc_get_type(sdom->pvt, struct ad_id_ctx);
841+
835842
state->op = sdap_id_op_create(state, subdom_id_ctx->ldap_ctx->conn_cache);
836843
if (!state->op) {
837844
DEBUG(SSSDBG_OP_FAILURE, "sdap_id_op_create failed\n");
@@ -844,6 +851,7 @@ sdap_ad_tokengroups_initgr_posix_send(TALLOC_CTX *mem_ctx,
844851
ret = ENOMEM;
845852
goto immediately;
846853
}
854+
*/
847855

848856
tevent_req_set_callback(subreq,
849857
sdap_ad_tokengroups_initgr_posix_sids_connect_done,
@@ -867,23 +875,26 @@ sdap_ad_tokengroups_initgr_posix_sids_connect_done(struct tevent_req *subreq)
867875
{
868876
struct sdap_ad_tokengroups_initgr_posix_state *state = NULL;
869877
struct tevent_req *req = NULL;
870-
int ret;
878+
//int ret;
871879

872880
req = tevent_req_callback_data(subreq, struct tevent_req);
873881
state = tevent_req_data(req,
874882
struct sdap_ad_tokengroups_initgr_posix_state);
875883

876884

885+
/*
877886
ret = sdap_id_op_connect_recv(subreq);
878887
talloc_zfree(subreq);
879888
880889
if (ret != EOK) {
881890
tevent_req_error(req, ret);
882891
return;
883892
}
893+
*/
884894

885895
subreq = sdap_get_ad_tokengroups_send(state, state->ev, state->opts,
886-
sdap_id_op_handle(state->op),
896+
// sdap_id_op_handle(state->op),
897+
NULL,
887898
state->username, state->orig_dn,
888899
state->timeout);
889900
if (subreq == NULL) {
@@ -1207,6 +1218,7 @@ sdap_ad_get_domain_local_groups_send(TALLOC_CTX *mem_ctx,
12071218
goto fail;
12081219
}
12091220

1221+
/*
12101222
state->op = sdap_id_op_create(state, state->conn->conn_cache);
12111223
if (state->op == NULL) {
12121224
DEBUG(SSSDBG_OP_FAILURE, "sdap_id_op_create failed\n");
@@ -1219,7 +1231,7 @@ sdap_ad_get_domain_local_groups_send(TALLOC_CTX *mem_ctx,
12191231
DEBUG(SSSDBG_OP_FAILURE, "sdap_id_op_connect_send failed.\n");
12201232
goto fail;
12211233
}
1222-
1234+
*/
12231235
tevent_req_set_callback(subreq,
12241236
sdap_ad_get_domain_local_groups_connect_done, req);
12251237

@@ -1239,18 +1251,20 @@ sdap_ad_get_domain_local_groups_connect_done(struct tevent_req *subreq)
12391251
struct tevent_req);
12401252
struct sdap_ad_get_domain_local_groups_state *state = tevent_req_data(req,
12411253
struct sdap_ad_get_domain_local_groups_state);
1254+
/*
12421255
int ret;
1243-
12441256
ret = sdap_id_op_connect_recv(subreq);
12451257
talloc_zfree(subreq);
12461258
12471259
if (ret != EOK) {
12481260
tevent_req_error(req, ret);
12491261
return;
12501262
}
1263+
*/
12511264
subreq = rfc2307bis_nested_groups_send(state, state->ev, state->opts,
12521265
state->sysdb, state->dom,
1253-
sdap_id_op_handle(state->op),
1266+
//sdap_id_op_handle(state->op),
1267+
NULL,
12541268
state->search_bases,
12551269
state->groups, state->num_groups,
12561270
state->group_hash, 0);

0 commit comments

Comments
 (0)