summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2004-05-26 17:45:12 +0000
committerJeremy Allison <jra@samba.org>2004-05-26 17:45:12 +0000
commit64ddd1beb2a10b68a3ed9bff882c50e2b700351d (patch)
tree28e54d4fd72fc301d1af8dd751bc2cb38da49b3d
parent230e6b99c618fcc4ee94307f801fedf602b0dc38 (diff)
downloadsamba-64ddd1beb2a10b68a3ed9bff882c50e2b700351d.tar.gz
samba-64ddd1beb2a10b68a3ed9bff882c50e2b700351d.tar.xz
samba-64ddd1beb2a10b68a3ed9bff882c50e2b700351d.zip
r910: Fix for bug #1385 found by Jason Mader <jason@ncac.gwu.edu>.
Don't use non-consts in a structure initialization. Jeremy.
-rw-r--r--source/passdb/pdb_ldap.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/source/passdb/pdb_ldap.c b/source/passdb/pdb_ldap.c
index 15635a034cc..ea1424860b5 100644
--- a/source/passdb/pdb_ldap.c
+++ b/source/passdb/pdb_ldap.c
@@ -1043,9 +1043,13 @@ static BOOL init_ldap_from_sam (struct ldapsam_privates *ldap_state,
DEBUG(7, ("bad password count is reset, deleting login cache entry for %s\n", pdb_get_nt_username(sampass)));
login_cache_delentry(sampass);
} else {
- LOGIN_CACHE cache_entry ={time(NULL),
- pdb_get_acct_ctrl(sampass),
- badcount, badtime};
+ LOGIN_CACHE cache_entry;
+
+ cache_entry.entry_timestamp = time(NULL);
+ cache_entry.acct_ctrl = pdb_get_acct_ctrl(sampass);
+ cache_entry.bad_password_count = badcount;
+ cache_entry.bad_password_time = badtime;
+
DEBUG(7, ("Updating bad password count and time in login cache\n"));
login_cache_write(sampass, cache_entry);
}