mirror of
https://github.com/samba-team/samba.git
synced 2025-01-10 01:18:15 +03:00
dsdb: Do not reuse "ret" variable as return code and for memcmp() comparison
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
This commit is contained in:
parent
2f17cbf3b2
commit
7a36b01888
@ -2842,8 +2842,8 @@ static int check_password_restrictions(struct setup_password_fields_io *io, WERR
|
||||
|
||||
/* 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,
|
||||
|
Loading…
Reference in New Issue
Block a user