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)
committerVolker Lendecke <vl@samba.org>
Sat, 23 Feb 2019 06:54:09 +0000 (07:54 +0100)
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>
source3/winbindd/wb_xids2sids.c
source3/winbindd/winbindd_proto.h

index 38e581eee8d88d335fe93f31e9a7e40332cb5bd9..891a4c2a4bd1a2dee67e83c3e989cb4ae2df9b50 100644 (file)
@@ -440,7 +440,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 c524d2050df627f10fcae142ea15f1159b4db3a9..2a829b0171a39228c96cee683670a35a8ca7e30b 100644 (file)
@@ -919,7 +919,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);