diff options
Diffstat (limited to 'source4/winbind/wb_sid2gid.c')
-rw-r--r-- | source4/winbind/wb_sid2gid.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/source4/winbind/wb_sid2gid.c b/source4/winbind/wb_sid2gid.c index 282d10c9c9..b4026cd635 100644 --- a/source4/winbind/wb_sid2gid.c +++ b/source4/winbind/wb_sid2gid.c @@ -23,9 +23,7 @@ #include "libcli/composite/composite.h" #include "winbind/wb_server.h" #include "smbd/service_task.h" -#include "winbind/wb_helper.h" #include "libcli/security/security.h" -#include "winbind/idmap.h" struct sid2gid_state { struct composite_context *ctx; @@ -40,7 +38,7 @@ struct composite_context *wb_sid2gid_send(TALLOC_CTX *mem_ctx, { struct composite_context *result, *ctx; struct sid2gid_state *state; - struct id_mapping *ids; + struct id_map *ids; DEBUG(5, ("wb_sid2gid_send called\n")); @@ -54,7 +52,7 @@ struct composite_context *wb_sid2gid_send(TALLOC_CTX *mem_ctx, result->private_data = state; state->service = service; - ids = talloc(result, struct id_mapping); + ids = talloc(result, struct id_map); if (composite_nomem(ids, result)) return result; ids->sid = dom_sid_dup(result, sid); @@ -72,19 +70,19 @@ static void sid2gid_recv_gid(struct composite_context *ctx) struct sid2gid_state *state = talloc_get_type(ctx->async.private_data, struct sid2gid_state); - struct id_mapping *ids = NULL; + struct id_map *ids = NULL; state->ctx->status = wb_sids2xids_recv(ctx, &ids); if (!composite_is_ok(state->ctx)) return; - if (!NT_STATUS_IS_OK(ids->status)) { - composite_error(state->ctx, ids->status); + if (ids->status != ID_MAPPED) { + composite_error(state->ctx, NT_STATUS_UNSUCCESSFUL); return; } - if (ids->unixid->type == ID_TYPE_BOTH || - ids->unixid->type == ID_TYPE_GID) { - state->gid = ids->unixid->id; + if (ids->xid.type == ID_TYPE_BOTH || + ids->xid.type == ID_TYPE_GID) { + state->gid = ids->xid.id; composite_done(state->ctx); } else { composite_error(state->ctx, NT_STATUS_INVALID_SID); |