Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Thu May 5 01:19:54 UTC 2022 on sn-devel-184
/* checks the NT hash password history */
for (i = 0; i < io->o.nt_history_len; i++) {
- ret = memcmp(io->n.nt_hash, io->o.nt_history[i].hash, 16);
- if (ret == 0) {
+ int pw_cmp = memcmp(io->n.nt_hash, io->o.nt_history[i].hash, 16);
+ if (pw_cmp == 0) {
ret = LDB_ERR_CONSTRAINT_VIOLATION;
*werror = WERR_PASSWORD_RESTRICTION;
ldb_asprintf_errstring(ldb,