From: Stefan Metzmacher Date: Tue, 13 Jun 2017 09:17:03 +0000 (+0200) Subject: libcli/auth: add const to set_pw_in_buffer() X-Git-Tag: samba-4.5.13~42 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0c7de3ca9009fb62e0296d00d6aa59e79b835992;p=thirdparty%2Fsamba.git libcli/auth: add const to set_pw_in_buffer() BUG: https://bugzilla.samba.org/show_bug.cgi?id=12782 Signed-off-by: Stefan Metzmacher Reviewed-by: Andreas Schneider (cherry picked from commit 1b48c8515ed8fd29204c82cc47f958f4636cd494) --- diff --git a/libcli/auth/proto.h b/libcli/auth/proto.h index cc9ae336685..a03f45ed7f3 100644 --- a/libcli/auth/proto.h +++ b/libcli/auth/proto.h @@ -187,7 +187,7 @@ void encode_or_decode_arc4_passwd_buffer(unsigned char pw_buf[532], const DATA_B encode a password buffer with an already unicode password. The rest of the buffer is filled with random data to make it harder to attack. ************************************************************/ -bool set_pw_in_buffer(uint8_t buffer[516], DATA_BLOB *password); +bool set_pw_in_buffer(uint8_t buffer[516], const DATA_BLOB *password); /*********************************************************** decode a password buffer diff --git a/libcli/auth/smbencrypt.c b/libcli/auth/smbencrypt.c index ebf6812fabe..afd9286b701 100644 --- a/libcli/auth/smbencrypt.c +++ b/libcli/auth/smbencrypt.c @@ -804,7 +804,7 @@ void encode_or_decode_arc4_passwd_buffer(unsigned char pw_buf[532], const DATA_B encode a password buffer with an already unicode password. The rest of the buffer is filled with random data to make it harder to attack. ************************************************************/ -bool set_pw_in_buffer(uint8_t buffer[516], DATA_BLOB *password) +bool set_pw_in_buffer(uint8_t buffer[516], const DATA_BLOB *password) { if (password->length > 512) { return false;