From 2ff1428b8db53298c9ecb49b3bf99e302e46c3f0 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 11 Jun 2015 18:16:01 +0100 Subject: [PATCH] s3: auth: Add some const to the struct netr_SamInfo3 * arguments of copy_netr_SamInfo3() and make_server_info_info3() Both functions only read from the struct netr_SamInfo3 * argument. Signed-off-by: Jeremy Allison Reviewed-by: Richard Sharpe Reviewed-by: Simo Sorce (cherry picked from commit c2411767adb5ce48a4619349075f6f8faae41aab) Conflicts: source3/auth/proto.h source3/auth/server_info.c --- source3/auth/auth_util.c | 2 +- source3/auth/proto.h | 4 ++-- source3/auth/server_info.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/source3/auth/auth_util.c b/source3/auth/auth_util.c index ceaa7064d59..afa78ecf692 100644 --- a/source3/auth/auth_util.c +++ b/source3/auth/auth_util.c @@ -1369,7 +1369,7 @@ NTSTATUS make_server_info_info3(TALLOC_CTX *mem_ctx, const char *sent_nt_username, const char *domain, struct auth_serversupplied_info **server_info, - struct netr_SamInfo3 *info3) + const struct netr_SamInfo3 *info3) { static const char zeros[16] = {0, }; diff --git a/source3/auth/proto.h b/source3/auth/proto.h index 76661fc833a..6ec206ec81a 100644 --- a/source3/auth/proto.h +++ b/source3/auth/proto.h @@ -232,7 +232,7 @@ NTSTATUS make_server_info_info3(TALLOC_CTX *mem_ctx, const char *sent_nt_username, const char *domain, struct auth_serversupplied_info **server_info, - struct netr_SamInfo3 *info3); + const struct netr_SamInfo3 *info3); struct wbcAuthUserInfo; NTSTATUS make_server_info_wbcAuthUserInfo(TALLOC_CTX *mem_ctx, const char *sent_nt_username, @@ -287,7 +287,7 @@ NTSTATUS samu_to_SamInfo3(TALLOC_CTX *mem_ctx, struct netr_SamInfo3 **_info3, struct extra_auth_info *extra); struct netr_SamInfo3 *copy_netr_SamInfo3(TALLOC_CTX *mem_ctx, - struct netr_SamInfo3 *orig); + const struct netr_SamInfo3 *orig); struct netr_SamInfo3 *wbcAuthUserInfo_to_netr_SamInfo3(TALLOC_CTX *mem_ctx, const struct wbcAuthUserInfo *info); diff --git a/source3/auth/server_info.c b/source3/auth/server_info.c index d2b7d6e938f..066b9a8156d 100644 --- a/source3/auth/server_info.c +++ b/source3/auth/server_info.c @@ -445,7 +445,7 @@ NTSTATUS samu_to_SamInfo3(TALLOC_CTX *mem_ctx, } } while(0) struct netr_SamInfo3 *copy_netr_SamInfo3(TALLOC_CTX *mem_ctx, - struct netr_SamInfo3 *orig) + const struct netr_SamInfo3 *orig) { struct netr_SamInfo3 *info3; unsigned int i; -- 2.11.4.GIT