dsdb: Clarify that most errors in make_error_and_update_badPwdCount() are not returned
authorAndrew Bartlett <abartlet@samba.org>
Thu, 31 Mar 2022 23:06:45 +0000 (12:06 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 5 May 2022 00:27:33 +0000 (00:27 +0000)
commit5348bd80035025e91158088db8efdea971b70557
treef4e01795f6d5d8103d61ccc887a7c83289b9fa94
parentddeedcb6b2a036e5d51be94c7f7215543ff3f163
dsdb: Clarify that most errors in make_error_and_update_badPwdCount() are not returned

This is mainly just to be clear, and was done while failing to work around compiler
warnings.

For the curious it was gcc version 4.8.5 20150623 (Red Hat 4.8.5-44) (CentOS 7)
build with -O3, which gave with other, later patches:

../../source4/dsdb/samdb/ldb_modules/password_hash.c: In function ‘check_password_restrictions_and_log’:
../../source4/dsdb/samdb/ldb_modules/password_hash.c:3231:5: error: assuming signed overflow does not occur when simplifying conditional to constant [-Werror=strict-overflow]
  if (ret == LDB_SUCCESS) {
     ^

Regardless, we make it clear that all values assigned to "ret" are
local small constants.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
source4/dsdb/samdb/ldb_modules/password_hash.c