s3-winbind: BUG 8166 - Don't lockout users when offline.
[kai/samba.git] / source3 / winbindd / winbindd_pam.c
index e1422e5cced124d0496ec375815b74e9e1e20f81..e5ad2e00b0023b334502e5e3819c0368bb06a3a8 100644 (file)
@@ -993,7 +993,10 @@ static NTSTATUS winbindd_dual_pam_auth_cached(struct winbindd_domain *domain,
 
        }
 
-       /* User does *NOT* know the correct password, modify info3 accordingly */
+       /* User does *NOT* know the correct password, modify info3 accordingly, but only if online */
+       if (domain->online == false) {
+               goto failed;
+       }
 
        /* failure of this is not critical */
        result = get_max_bad_attempts_from_lockout_policy(domain, state->mem_ctx, &max_allowed_bad_attempts);