r910: Fix for bug #1385 found by Jason Mader <jason@ncac.gwu.edu>.
authorJeremy Allison <jra@samba.org>
Wed, 26 May 2004 17:45:12 +0000 (17:45 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 15:51:48 +0000 (10:51 -0500)
Don't use non-consts in a structure initialization.
Jeremy.
(This used to be commit 455ed258b3457ad5b7d3dad14b64781ab98f00dc)

source3/passdb/pdb_ldap.c

index 15635a034ccfb7dd4d16c4823cf4854582868945..ea1424860b58346f10ca5d14f9cef5799314e42d 100644 (file)
@@ -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);
                }