summaryrefslogtreecommitdiff
path: root/source3/nsswitch/winbindd_pam.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2006-09-15 14:05:28 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:51:49 -0500
commit07e9f4e61ae909d7ccc7ec7b650438510468829d (patch)
treec1c293453d9893f93dafc61a84db64084b1f36b6 /source3/nsswitch/winbindd_pam.c
parent315ad641c381b0630976eff711f251d1831ffc7c (diff)
downloadsamba-07e9f4e61ae909d7ccc7ec7b650438510468829d.tar.gz
samba-07e9f4e61ae909d7ccc7ec7b650438510468829d.tar.bz2
samba-07e9f4e61ae909d7ccc7ec7b650438510468829d.zip
r18551: Implement a 30 seconds from startup, during which we
try hard to connect a DC even if we might be offline. Jeremy. (This used to be commit a9f115140700487767bafa058db744eea5ee8f77)
Diffstat (limited to 'source3/nsswitch/winbindd_pam.c')
-rw-r--r--source3/nsswitch/winbindd_pam.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/source3/nsswitch/winbindd_pam.c b/source3/nsswitch/winbindd_pam.c
index f27fc610a6..df12ceb3f1 100644
--- a/source3/nsswitch/winbindd_pam.c
+++ b/source3/nsswitch/winbindd_pam.c
@@ -1208,6 +1208,18 @@ enum winbindd_result winbindd_dual_pam_auth(struct winbindd_domain *domain,
parse_domain_user(state->request.data.auth.user, name_domain, name_user);
+ if (domain->online == False && domain->startup) {
+ /* Logons are very important to users. If we're offline and
+ we get a request within the first 30 seconds of startup,
+ try very hard to find a DC and go online. */
+
+ DEBUG(10,("winbindd_dual_pam_auth: domain: %s offline and auth "
+ "request in startup mode.\n", domain->name ));
+
+ winbindd_flush_negative_conn_cache(domain);
+ set_dc_type_and_flags(domain);
+ }
+
DEBUG(10,("winbindd_dual_pam_auth: domain: %s last was %s\n", domain->name, domain->online ? "online":"offline"));
/* Check for Kerberos authentication */