mirror of
https://github.com/samba-team/samba.git
synced 2025-01-26 10:04:02 +03:00
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>
This commit is contained in:
parent
ab2ca882e1
commit
5e1e33114c
@ -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);
|
||||
|
@ -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) {
|
||||
|
@ -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) {
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user