Only cache password policy results that worked, otherwise we
authorBo Yang <boyang@novell.com>
Mon, 7 Apr 2008 13:51:42 +0000 (09:51 -0400)
committerJim McDonough <jmcd@samba.org>
Mon, 7 Apr 2008 13:51:42 +0000 (09:51 -0400)
cannot login until the cache expires even if a connection
to a DC has been restored.
(This used to be commit 8671f9767d7d93a86712741303d6046937c3aae8)

source3/winbindd/winbindd_cache.c

index 0f8bd49d0684f7a532367f3eab0bd8281b2e0250..e4b0a53d5d1188cb58aa45dabb057b27eea10b05 100644 (file)
@@ -2232,7 +2232,9 @@ do_query:
 
        /* and save it */
        refresh_sequence_number(domain, false);
-       wcache_save_password_policy(domain, status, policy);
+       if (NT_STATUS_IS_OK(status)) {
+               wcache_save_password_policy(domain, status, policy);
+       }
 
        return status;
 }