From c2411767adb5ce48a4619349075f6f8faae41aab Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 16 Jun 2014 22:49:29 -0700 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 --- 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 cab77b40515..2986fb4372f 100644 --- a/source3/auth/auth_util.c +++ b/source3/auth/auth_util.c @@ -1335,7 +1335,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 9e11a0cc5da..686582a2acd 100644 --- a/source3/auth/proto.h +++ b/source3/auth/proto.h @@ -242,7 +242,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, @@ -304,7 +304,7 @@ NTSTATUS passwd_to_SamInfo3(TALLOC_CTX *mem_ctx, const struct passwd *pwd, struct netr_SamInfo3 **pinfo3); struct netr_SamInfo3 *copy_netr_SamInfo3(TALLOC_CTX *mem_ctx, - struct netr_SamInfo3 *orig); + const struct netr_SamInfo3 *orig); /* The following definitions come from auth/auth_wbc.c */ diff --git a/source3/auth/server_info.c b/source3/auth/server_info.c index df0be5418f2..4ce57c1f4ac 100644 --- a/source3/auth/server_info.c +++ b/source3/auth/server_info.c @@ -580,7 +580,7 @@ done: } } 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