summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/passdb/login_cache.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source3/passdb/login_cache.c b/source3/passdb/login_cache.c
index 5acec64573..fc05122cca 100644
--- a/source3/passdb/login_cache.c
+++ b/source3/passdb/login_cache.c
@@ -110,7 +110,9 @@ BOOL login_cache_write(const SAM_ACCOUNT *sampass, LOGIN_CACHE entry)
TDB_DATA keybuf, databuf;
BOOL ret;
-
+
+ if (!login_cache_init())
+ return False;
keybuf.dptr = strdup(pdb_get_nt_username(sampass));
if (!keybuf.dptr || !strlen(keybuf.dptr)) {