diff options
author | Andrew Tridgell <tridge@samba.org> | 2011-07-26 10:50:22 +1000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2011-09-08 15:09:54 +0200 |
commit | 5e1e33114c3aa62221ac1bf82eaaf2b3a2ac1efa (patch) | |
tree | 66cfe04c0f050b8a013fc0949ca297037ada1781 /source4/winbind | |
parent | ab2ca882e1bf0674bd06fd4009caedcca2410b73 (diff) | |
download | samba-5e1e33114c3aa62221ac1bf82eaaf2b3a2ac1efa.tar.gz samba-5e1e33114c3aa62221ac1bf82eaaf2b3a2ac1efa.tar.bz2 samba-5e1e33114c3aa62221ac1bf82eaaf2b3a2ac1efa.zip |
s4-winbind: added count argument to wb_sids2xids_recv()
this allows callers to know how many SIDs were mapped
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4/winbind')
-rw-r--r-- | source4/winbind/wb_irpc.c | 2 | ||||
-rw-r--r-- | source4/winbind/wb_sid2gid.c | 2 | ||||
-rw-r--r-- | source4/winbind/wb_sid2uid.c | 2 | ||||
-rw-r--r-- | source4/winbind/wb_sids2xids.c | 5 |
4 files changed, 7 insertions, 4 deletions
diff --git a/source4/winbind/wb_irpc.c b/source4/winbind/wb_irpc.c index 1eed89fd41..2f2b0780c7 100644 --- a/source4/winbind/wb_irpc.c +++ b/source4/winbind/wb_irpc.c @@ -172,7 +172,7 @@ static void wb_irpc_get_idmap_callback(struct composite_context *ctx) switch(s->level) { case WINBIND_IDMAP_LEVEL_SIDS_TO_XIDS: - status = wb_sids2xids_recv(ctx, &s->req->out.ids); + status = wb_sids2xids_recv(ctx, &s->req->out.ids, NULL); break; case WINBIND_IDMAP_LEVEL_XIDS_TO_SIDS: status = wb_xids2sids_recv(ctx, &s->req->out.ids); diff --git a/source4/winbind/wb_sid2gid.c b/source4/winbind/wb_sid2gid.c index b4026cd635..0b3589561f 100644 --- a/source4/winbind/wb_sid2gid.c +++ b/source4/winbind/wb_sid2gid.c @@ -72,7 +72,7 @@ static void sid2gid_recv_gid(struct composite_context *ctx) struct id_map *ids = NULL; - state->ctx->status = wb_sids2xids_recv(ctx, &ids); + state->ctx->status = wb_sids2xids_recv(ctx, &ids, NULL); if (!composite_is_ok(state->ctx)) return; if (ids->status != ID_MAPPED) { diff --git a/source4/winbind/wb_sid2uid.c b/source4/winbind/wb_sid2uid.c index 1fff66f655..f1d9bdd677 100644 --- a/source4/winbind/wb_sid2uid.c +++ b/source4/winbind/wb_sid2uid.c @@ -72,7 +72,7 @@ static void sid2uid_recv_uid(struct composite_context *ctx) struct id_map *ids = NULL; - state->ctx->status = wb_sids2xids_recv(ctx, &ids); + state->ctx->status = wb_sids2xids_recv(ctx, &ids, NULL); if (!composite_is_ok(state->ctx)) return; if (ids->status != ID_MAPPED) { diff --git a/source4/winbind/wb_sids2xids.c b/source4/winbind/wb_sids2xids.c index c966c40dc0..01ad64580b 100644 --- a/source4/winbind/wb_sids2xids.c +++ b/source4/winbind/wb_sids2xids.c @@ -74,7 +74,7 @@ struct composite_context *wb_sids2xids_send(TALLOC_CTX *mem_ctx, } NTSTATUS wb_sids2xids_recv(struct composite_context *ctx, - struct id_map **ids) + struct id_map **ids, unsigned *count) { NTSTATUS status = composite_wait(ctx); struct sids2xids_state *state = talloc_get_type(ctx->private_data, @@ -86,6 +86,9 @@ NTSTATUS wb_sids2xids_recv(struct composite_context *ctx, * the results are filled into the pointers the caller * supplied */ *ids = state->ids; + if (count != NULL) { + *count = state->count; + } talloc_free(ctx); return status; |