summaryrefslogtreecommitdiff
path: root/source3/passdb
diff options
context:
space:
mode:
authorNoel Power <noel.power@suse.com>2019-09-06 13:46:40 +0000
committerJeremy Allison <jra@samba.org>2019-09-26 18:41:28 +0000
commit388f280448b9ea459d8d884dbbbce54ab930da7b (patch)
treed3781dfc1d7c70e94c575dd4d74fdc6d1ac44569 /source3/passdb
parent6ae0fd5a348224b2a7942c81c4ef21bf11205d62 (diff)
downloadsamba-388f280448b9ea459d8d884dbbbce54ab930da7b.tar.gz
s3/passdb: clang: Fix warning: Value stored to 'acct_ctrl' is never read
Fixes: source3/passdb/pdb_ldap.c:922:3: warning: Value stored to 'acct_ctrl' is never read <--[clang] acct_ctrl |= ACB_NORMAL; ^ ~~~~~~~~~~ Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3/passdb')
-rw-r--r--source3/passdb/pdb_ldap.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/source3/passdb/pdb_ldap.c b/source3/passdb/pdb_ldap.c
index 3dbc8f9f07a..aefd770ad31 100644
--- a/source3/passdb/pdb_ldap.c
+++ b/source3/passdb/pdb_ldap.c
@@ -491,7 +491,6 @@ static bool init_sam_from_ldap(struct ldapsam_privates *ldap_state,
uint8_t smblmpwd[LM_HASH_LEN],
smbntpwd[NT_HASH_LEN];
bool use_samba_attrs = True;
- uint32_t acct_ctrl = 0;
uint16_t logon_divs;
uint16_t bad_password_count = 0,
logon_count = 0;
@@ -911,6 +910,7 @@ static bool init_sam_from_ldap(struct ldapsam_privates *ldap_state,
LDAP_ATTR_ACB_INFO),
ctx);
if (temp) {
+ uint32_t acct_ctrl = 0;
acct_ctrl = pdb_decode_acct_ctrl(temp);
if (acct_ctrl == 0) {
@@ -918,8 +918,6 @@ static bool init_sam_from_ldap(struct ldapsam_privates *ldap_state,
}
pdb_set_acct_ctrl(sampass, acct_ctrl, PDB_SET);
- } else {
- acct_ctrl |= ACB_NORMAL;
}
pdb_set_hours_len(sampass, hours_len, PDB_SET);