summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2015-01-20 10:25:37 +0100
committerGünther Deschner <gd@samba.org>2015-03-16 20:26:51 +0100
commit36fce5c413852e2639a9ce91b25fce2de8492fa8 (patch)
treea28c83e6fe65fc94652caa2b319023d8c1ff839b /source3
parenta221d88c393dcf8d78307795b37f95b720c78a65 (diff)
downloadsamba-36fce5c413852e2639a9ce91b25fce2de8492fa8.tar.gz
s3:winbind:grent: use wb_next_domain() in wb_next_grent.c
Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
Diffstat (limited to 'source3')
-rw-r--r--source3/winbindd/wb_next_grent.c32
1 files changed, 3 insertions, 29 deletions
diff --git a/source3/winbindd/wb_next_grent.c b/source3/winbindd/wb_next_grent.c
index 02f929ac2f5..108be351665 100644
--- a/source3/winbindd/wb_next_grent.c
+++ b/source3/winbindd/wb_next_grent.c
@@ -55,17 +55,7 @@ struct tevent_req *wb_next_grent_send(TALLOC_CTX *mem_ctx,
if (state->gstate->next_group >= state->gstate->num_groups) {
TALLOC_FREE(state->gstate->groups);
- if (state->gstate->domain == NULL) {
- state->gstate->domain = domain_list();
- } else {
- state->gstate->domain = state->gstate->domain->next;
- }
-
- if ((state->gstate->domain != NULL)
- && sid_check_is_our_sam(&state->gstate->domain->sid)) {
- state->gstate->domain = state->gstate->domain->next;
- }
-
+ state->gstate->domain = wb_next_domain(state->gstate->domain);
if (state->gstate->domain == NULL) {
tevent_req_nterror(req, NT_STATUS_NO_MORE_ENTRIES);
return tevent_req_post(req, ev);
@@ -122,13 +112,7 @@ static void wb_next_grent_fetch_done(struct tevent_req *subreq)
state->gstate, &state->next_groups.principals);
if (state->gstate->num_groups == 0) {
- state->gstate->domain = state->gstate->domain->next;
-
- if ((state->gstate->domain != NULL)
- && sid_check_is_our_sam(&state->gstate->domain->sid)) {
- state->gstate->domain = state->gstate->domain->next;
- }
-
+ state->gstate->domain = wb_next_domain(state->gstate->domain);
if (state->gstate->domain == NULL) {
tevent_req_nterror(req, NT_STATUS_NO_MORE_ENTRIES);
return;
@@ -175,18 +159,8 @@ static void wb_next_grent_getgrsid_done(struct tevent_req *subreq)
if (state->gstate->next_group >= state->gstate->num_groups) {
TALLOC_FREE(state->gstate->groups);
- if (state->gstate->domain == NULL) {
- state->gstate->domain = domain_list();
- } else {
- state->gstate->domain = state->gstate->domain->next;
- }
-
- if ((state->gstate->domain != NULL) &&
- sid_check_is_our_sam(&state->gstate->domain->sid))
- {
- state->gstate->domain = state->gstate->domain->next;
- }
+ state->gstate->domain = wb_next_domain(state->gstate->domain);
if (state->gstate->domain == NULL) {
tevent_req_nterror(req,
NT_STATUS_NO_MORE_ENTRIES);