From 8234ef264a7d9344b412a0b2b36dc4c6b47876e4 Mon Sep 17 00:00:00 2001 From: Ralph Boehme Date: Fri, 22 Feb 2019 16:29:07 +0100 Subject: winbindd: make xids a const argument to wb_xids2sids_send() 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 Reviewed-by: Volker Lendecke (cherry picked from commit 5d277ea7ea258676b9ea5081a451a5874af115f6) --- source3/winbindd/wb_xids2sids.c | 2 +- source3/winbindd/winbindd_proto.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/source3/winbindd/wb_xids2sids.c b/source3/winbindd/wb_xids2sids.c index f4ff1a577d0..aba83823c7b 100644 --- a/source3/winbindd/wb_xids2sids.c +++ b/source3/winbindd/wb_xids2sids.c @@ -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; diff --git a/source3/winbindd/winbindd_proto.h b/source3/winbindd/winbindd_proto.h index 85cd50b8ed7..3a94a201c27 100644 --- a/source3/winbindd/winbindd_proto.h +++ b/source3/winbindd/winbindd_proto.h @@ -925,7 +925,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); -- cgit v1.2.1