diff options
author | Andrew Bartlett <abartlet@samba.org> | 2008-09-22 17:50:43 -0700 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2008-09-22 17:50:43 -0700 |
commit | c39d1b829b02d275ea1052afec58ab40f22267a3 (patch) | |
tree | fa1884b01df6bccebbf7d2bb978eb2d7cd3a0bc4 /source4/rpc_server/netlogon | |
parent | aaa45c832596d8f1b75f09f1de8fbee7483f6977 (diff) | |
download | samba-c39d1b829b02d275ea1052afec58ab40f22267a3.tar.gz samba-c39d1b829b02d275ea1052afec58ab40f22267a3.tar.bz2 samba-c39d1b829b02d275ea1052afec58ab40f22267a3.zip |
Remove unused parameter from decode_pw_buffer and fail on invalid
UTF-16 input
The input checking is important, as otherwise we could set the wrong
password.
Andrew Bartlett
Diffstat (limited to 'source4/rpc_server/netlogon')
-rw-r--r-- | source4/rpc_server/netlogon/dcerpc_netlogon.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/source4/rpc_server/netlogon/dcerpc_netlogon.c b/source4/rpc_server/netlogon/dcerpc_netlogon.c index 6f4287f9d8..cceb2a62ac 100644 --- a/source4/rpc_server/netlogon/dcerpc_netlogon.c +++ b/source4/rpc_server/netlogon/dcerpc_netlogon.c @@ -337,7 +337,6 @@ static NTSTATUS dcesrv_netr_ServerPasswordSet2(struct dcesrv_call_state *dce_cal struct ldb_context *sam_ctx; NTSTATUS nt_status; char new_pass[512]; - uint32_t new_pass_len; bool ret; struct samr_CryptPassword password_buf; @@ -358,7 +357,7 @@ static NTSTATUS dcesrv_netr_ServerPasswordSet2(struct dcesrv_call_state *dce_cal creds_arcfour_crypt(creds, password_buf.data, 516); ret = decode_pw_buffer(password_buf.data, new_pass, sizeof(new_pass), - &new_pass_len, STR_UNICODE); + STR_UNICODE); if (!ret) { DEBUG(3,("netr_ServerPasswordSet2: failed to decode password buffer\n")); return NT_STATUS_ACCESS_DENIED; |