diff options
author | Volker Lendecke <vl@samba.org> | 2017-01-03 12:11:30 +0000 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2017-01-04 12:22:13 +0100 |
commit | 480c9581a13afc08b20e80d2ff8a45ac8d7f18d3 (patch) | |
tree | 17622f4d2e38895e16de4de985a8514ba949e217 /source3/winbindd/winbindd_msrpc.c | |
parent | 67c0696761dedb748b1e4dc02531acbbf5ff95ca (diff) | |
download | samba-480c9581a13afc08b20e80d2ff8a45ac8d7f18d3.tar.gz |
winbind: Simplify query_user_list to only return rids
Unfortunately this is a pretty large patch, because many functions
implement this API. The alternative would have been to create a new
backend function, add the new one piece by piece and then remove the
original function.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Diffstat (limited to 'source3/winbindd/winbindd_msrpc.c')
-rw-r--r-- | source3/winbindd/winbindd_msrpc.c | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/source3/winbindd/winbindd_msrpc.c b/source3/winbindd/winbindd_msrpc.c index bc19973082d..4b742c4c58b 100644 --- a/source3/winbindd/winbindd_msrpc.c +++ b/source3/winbindd/winbindd_msrpc.c @@ -49,22 +49,16 @@ static NTSTATUS winbindd_lookup_names(TALLOC_CTX *mem_ctx, application. */ static NTSTATUS msrpc_query_user_list(struct winbindd_domain *domain, TALLOC_CTX *mem_ctx, - uint32_t *pnum_info, - struct wbint_userinfo **pinfo) + uint32_t **prids) { struct rpc_pipe_client *samr_pipe = NULL; struct policy_handle dom_pol; - struct wbint_userinfo *info = NULL; - uint32_t num_info = 0; + uint32_t *rids; TALLOC_CTX *tmp_ctx; NTSTATUS status; DEBUG(3, ("msrpc_query_user_list\n")); - if (pnum_info) { - *pnum_info = 0; - } - tmp_ctx = talloc_stackframe(); if (tmp_ctx == NULL) { return NT_STATUS_NO_MEMORY; @@ -86,18 +80,13 @@ static NTSTATUS msrpc_query_user_list(struct winbindd_domain *domain, samr_pipe, &dom_pol, &domain->sid, - &num_info, - &info); + &rids); if (!NT_STATUS_IS_OK(status)) { goto done; } - if (pnum_info) { - *pnum_info = num_info; - } - - if (pinfo) { - *pinfo = talloc_move(mem_ctx, &info); + if (prids) { + *prids = talloc_move(mem_ctx, &rids); } done: |