Skip to content

Commit

Permalink
libcli:auth: Rename encode_or_decode_arc4_passwd_buffer()
Browse files Browse the repository at this point in the history
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14031

Signed-off-by: Andreas Schneider <[email protected]>
Reviewed-by: Andrew Bartlett <[email protected]>
  • Loading branch information
cryptomilk authored and abartlet committed Jul 26, 2019
1 parent dea1608 commit 89f8b02
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 10 deletions.
4 changes: 2 additions & 2 deletions libcli/auth/proto.h
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,8 @@ bool decode_pw_buffer(TALLOC_CTX *ctx,
/***********************************************************
Decode an arc4 encrypted password change buffer.
************************************************************/
NTSTATUS encode_or_decode_arc4_passwd_buffer(unsigned char pw_buf[532],
const DATA_BLOB *psession_key);
NTSTATUS decode_rc4_passwd_buffer(unsigned char pw_buf[532],
const DATA_BLOB *psession_key);

/***********************************************************
encode a password buffer with an already unicode password. The
Expand Down
4 changes: 2 additions & 2 deletions libcli/auth/smbencrypt.c
Original file line number Diff line number Diff line change
Expand Up @@ -843,8 +843,8 @@ bool decode_pw_buffer(TALLOC_CTX *ctx,
Decode an arc4 encrypted password change buffer.
************************************************************/

NTSTATUS encode_or_decode_arc4_passwd_buffer(unsigned char pw_buf[532],
const DATA_BLOB *psession_key)
NTSTATUS decode_rc4_passwd_buffer(unsigned char pw_buf[532],
const DATA_BLOB *psession_key)
{
/* Confounder is last 16 bytes. */
DATA_BLOB confounder = data_blob_const(&pw_buf[516], 16);
Expand Down
6 changes: 2 additions & 4 deletions libcli/auth/tests/test_rc4_passwd_buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,7 @@ static void torture_decode_rc4_passwd_buffer(void **state)
encrypted_test_blob,
sizeof(out_pwd_buf.data));

status = encode_or_decode_arc4_passwd_buffer(out_pwd_buf.data,
&session_key);
status = decode_rc4_passwd_buffer(out_pwd_buf.data, &session_key);
assert_true(NT_STATUS_IS_OK(status));

ok = decode_pw_buffer(NULL,
Expand Down Expand Up @@ -144,8 +143,7 @@ static void torture_rc4_passwd_buffer(void **state)
&out_pwd_buf);
assert_true(NT_STATUS_IS_OK(status));

status = encode_or_decode_arc4_passwd_buffer(out_pwd_buf.data,
&session_key);
status = decode_rc4_passwd_buffer(out_pwd_buf.data, &session_key);
assert_true(NT_STATUS_IS_OK(status));

ok = decode_pw_buffer(NULL,
Expand Down
4 changes: 2 additions & 2 deletions source3/rpc_server/samr/srv_samr_nt.c
Original file line number Diff line number Diff line change
Expand Up @@ -5185,7 +5185,7 @@ NTSTATUS _samr_SetUserInfo(struct pipes_struct *p,
if(!NT_STATUS_IS_OK(status)) {
break;
}
status = encode_or_decode_arc4_passwd_buffer(
status = decode_rc4_passwd_buffer(
info->info25.password.data,
&session_key);
if (!NT_STATUS_IS_OK(status)) {
Expand All @@ -5204,7 +5204,7 @@ NTSTATUS _samr_SetUserInfo(struct pipes_struct *p,
if(!NT_STATUS_IS_OK(status)) {
break;
}
status = encode_or_decode_arc4_passwd_buffer(
status = decode_rc4_passwd_buffer(
info->info26.password.data,
&session_key);
if (!NT_STATUS_IS_OK(status)) {
Expand Down

0 comments on commit 89f8b02

Please sign in to comment.