winbindd: make xids a const argument to wb_xids2sids_send()
authorRalph Boehme <slow@samba.org>
Fri, 22 Feb 2019 15:29:07 +0000 (16:29 +0100)
committerKarolin Seeger <kseeger@samba.org>
Mon, 4 Mar 2019 10:37:54 +0000 (10:37 +0000)
The previous commit made an internal copy of xids, this commit makes it
more obvious that we must not mess with the xids argument but treat it as
an in-parameter and don't write to it.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=13802

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit 5d277ea7ea258676b9ea5081a451a5874af115f6)

source3/winbindd/wb_xids2sids.c
source3/winbindd/winbindd_proto.h

index f4ff1a577d0dc35904d79e7116855bf54ae177d3..aba83823c7bd36c2405b4c0084636604f72298db 100644 (file)
@@ -437,7 +437,7 @@ static void wb_xids2sids_init_dom_maps_done(struct tevent_req *subreq);
 
 struct tevent_req *wb_xids2sids_send(TALLOC_CTX *mem_ctx,
                                     struct tevent_context *ev,
-                                    struct unixid *xids,
+                                    const struct unixid *xids,
                                     uint32_t num_xids)
 {
        struct tevent_req *req, *subreq;
index be3626dc477ba88d72816be2d477035eb7dd6aa0..ae8f555ec45e19e9ff0bb0ec3fda9ea713f9f984 100644 (file)
@@ -914,7 +914,7 @@ NTSTATUS winbindd_sids_to_xids_recv(struct tevent_req *req,
                                    struct winbindd_response *response);
 struct tevent_req *wb_xids2sids_send(TALLOC_CTX *mem_ctx,
                                     struct tevent_context *ev,
-                                    struct unixid *xids,
+                                    const struct unixid *xids,
                                     uint32_t num_xids);
 NTSTATUS wb_xids2sids_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
                           struct dom_sid **sids);