diff options
author | Stefan Metzmacher <metze@samba.org> | 2017-01-18 19:02:21 +0000 |
---|---|---|
committer | Ralph Boehme <slow@samba.org> | 2017-02-21 16:09:21 +0100 |
commit | 8a209e5a0ca810d8cf0e5ebc1902fae8c5cb241e (patch) | |
tree | 7ef08547071c20ff0ce6af74620c6de9f066b65a /libcli | |
parent | 0ed2a65593b5abc9ba7f40992ed0ed8f448f5836 (diff) | |
download | samba-8a209e5a0ca810d8cf0e5ebc1902fae8c5cb241e.tar.gz |
libcli/auth: check E_md4hash() result in netlogon_creds_cli_ServerPasswordSet_send()
We need to make sure we can convert the given string to an nthash.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12262
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Diffstat (limited to 'libcli')
-rw-r--r-- | libcli/auth/netlogon_creds_cli.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libcli/auth/netlogon_creds_cli.c b/libcli/auth/netlogon_creds_cli.c index b97d60e3a02..93ec1bfd194 100644 --- a/libcli/auth/netlogon_creds_cli.c +++ b/libcli/auth/netlogon_creds_cli.c @@ -1747,7 +1747,11 @@ struct tevent_req *netlogon_creds_cli_ServerPasswordSet_send(TALLOC_CTX *mem_ctx /* * netr_ServerPasswordSet */ - E_md4hash(new_password, state->samr_password.hash); + ok = E_md4hash(new_password, state->samr_password.hash); + if (!ok) { + tevent_req_nterror(req, NT_STATUS_INVALID_PARAMETER_MIX); + return tevent_req_post(req, ev); + } /* * netr_ServerPasswordSet2 |