1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-08 21:18:16 +03:00

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>
This commit is contained in:
Volker Lendecke 2017-08-21 12:00:23 +02:00 committed by Andrew Bartlett
parent 6344570a30
commit 6222cd71ee

View File

@ -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,