diff options
author | Volker Lendecke <vl@samba.org> | 2016-02-08 17:34:38 +0100 |
---|---|---|
committer | Ralph Boehme <slow@samba.org> | 2016-02-22 20:29:15 +0100 |
commit | e2dda192e7f8b65a5f02120be56cf0f07d03679f (patch) | |
tree | 5b9a1382c0c19c0fe6d071e2324ceabfe2a0895d | |
parent | b0f6adf35172065647f4ed62dce37114ce932397 (diff) | |
download | samba-e2dda192e7f8b65a5f02120be56cf0f07d03679f.tar.gz |
winbind: Use xids2sids in getgrgid
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
-rw-r--r-- | source3/winbindd/winbindd_getgrgid.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/source3/winbindd/winbindd_getgrgid.c b/source3/winbindd/winbindd_getgrgid.c index 0f12fa4bfa4..8e8bdeea86a 100644 --- a/source3/winbindd/winbindd_getgrgid.c +++ b/source3/winbindd/winbindd_getgrgid.c @@ -19,10 +19,12 @@ #include "includes.h" #include "winbindd.h" +#include "libcli/security/dom_sid.h" struct winbindd_getgrgid_state { struct tevent_context *ev; - struct dom_sid sid; + struct unixid xid; + struct dom_sid *sid; const char *domname; const char *name; gid_t gid; @@ -49,7 +51,10 @@ struct tevent_req *winbindd_getgrgid_send(TALLOC_CTX *mem_ctx, DEBUG(3, ("getgrgid %d\n", (int)request->data.gid)); - subreq = wb_gid2sid_send(state, ev, request->data.gid); + state->xid = (struct unixid) { + .id = request->data.uid, .type = ID_TYPE_GID }; + + subreq = wb_xids2sids_send(state, ev, &state->xid, 1); if (tevent_req_nomem(subreq, req)) { return tevent_req_post(req, ev); } @@ -66,13 +71,13 @@ static void winbindd_getgrgid_gid2sid_done(struct tevent_req *subreq) req, struct winbindd_getgrgid_state); NTSTATUS status; - status = wb_gid2sid_recv(subreq, &state->sid); + status = wb_xids2sids_recv(subreq, state, &state->sid); TALLOC_FREE(subreq); if (tevent_req_nterror(req, status)) { return; } - subreq = wb_getgrsid_send(state, state->ev, &state->sid, + subreq = wb_getgrsid_send(state, state->ev, state->sid, lp_winbind_expand_groups()); if (tevent_req_nomem(subreq, req)) { return; @@ -108,7 +113,7 @@ NTSTATUS winbindd_getgrgid_recv(struct tevent_req *req, if (tevent_req_is_nterror(req, &status)) { DEBUG(5, ("Could not convert sid %s: %s\n", - sid_string_dbg(&state->sid), nt_errstr(status))); + sid_string_dbg(state->sid), nt_errstr(status))); return status; } |