diff options
author | Volker Lendecke <vl@samba.org> | 2017-08-21 12:00:23 +0200 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2017-09-16 08:36:18 +0200 |
commit | 6222cd71eee3afe88931b74e7f508ca0a969f718 (patch) | |
tree | 440b75ef8415ea41ab91df8031416ce1cdd6de69 /libcli | |
parent | 6344570a307eb70979ebb43feb3faf0fb2cbf4c8 (diff) | |
download | samba-6222cd71eee3afe88931b74e7f508ca0a969f718.tar.gz |
netlogon_creds_cli: Use data_blob_cmp in netlogon_creds_cli_validate
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'libcli')
-rw-r--r-- | libcli/auth/netlogon_creds_cli.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/libcli/auth/netlogon_creds_cli.c b/libcli/auth/netlogon_creds_cli.c index a124a1c03da..dc05316ac13 100644 --- a/libcli/auth/netlogon_creds_cli.c +++ b/libcli/auth/netlogon_creds_cli.c @@ -669,19 +669,11 @@ bool netlogon_creds_cli_validate(struct netlogon_creds_cli_context *context, return false; } - if (blob1.length != blob2.length) { - TALLOC_FREE(frame); - return false; - } - - cmp = memcmp(blob1.data, blob2.data, blob1.length); - if (cmp != 0) { - TALLOC_FREE(frame); - return false; - } + cmp = data_blob_cmp(&blob1, &blob2); TALLOC_FREE(frame); - return true; + + return (cmp == 0); } NTSTATUS netlogon_creds_cli_store(struct netlogon_creds_cli_context *context, |