svn commit: samba r13013 - in trunk/source: nsswitch param

gd at samba.org gd at samba.org
Wed Jan 18 19:27:28 GMT 2006


Author: gd
Date: 2006-01-18 19:27:26 +0000 (Wed, 18 Jan 2006)
New Revision: 13013

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=13013

Log:
Add lp_winbind_offline_logon(), off by default

Guenther


Modified:
   trunk/source/nsswitch/winbindd_pam.c
   trunk/source/param/loadparm.c


Changeset:
Modified: trunk/source/nsswitch/winbindd_pam.c
===================================================================
--- trunk/source/nsswitch/winbindd_pam.c	2006-01-18 19:25:18 UTC (rev 13012)
+++ trunk/source/nsswitch/winbindd_pam.c	2006-01-18 19:27:26 UTC (rev 13013)
@@ -1105,7 +1105,8 @@
 
 cached_logon:
 	/* Check for Cached logons */
-	if (!domain->online && (state->request.flags & WBFLAG_PAM_CACHED_LOGIN)) {
+	if (!domain->online && (state->request.flags & WBFLAG_PAM_CACHED_LOGIN) && 
+	    lp_winbind_offline_logon()) {
 	
 		result = winbindd_dual_pam_auth_cached(domain, state, &info3);
 
@@ -1152,7 +1153,8 @@
 
 		}
 
-		if (state->request.flags & WBFLAG_PAM_CACHED_LOGIN) {
+		if ((state->request.flags & WBFLAG_PAM_CACHED_LOGIN) &&
+		    lp_winbind_offline_logon()) {
 
 			result = winbindd_store_creds(domain,
 						      state->mem_ctx,
@@ -1614,7 +1616,8 @@
 	}
 
 done: 
-	if (NT_STATUS_IS_OK(result) && (state->request.flags & WBFLAG_PAM_CACHED_LOGIN)) {
+	if (NT_STATUS_IS_OK(result) && (state->request.flags & WBFLAG_PAM_CACHED_LOGIN) &&
+	    lp_winbind_offline_logon()) {
 
 		NTSTATUS cred_ret;
 		

Modified: trunk/source/param/loadparm.c
===================================================================
--- trunk/source/param/loadparm.c	2006-01-18 19:25:18 UTC (rev 13012)
+++ trunk/source/param/loadparm.c	2006-01-18 19:27:26 UTC (rev 13013)
@@ -181,6 +181,7 @@
 	BOOL bWinbindTrustedDomainsOnly;
 	BOOL bWinbindNestedGroups;
 	BOOL bWinbindRefreshTickets;
+	BOOL bWinbindOfflineLogon;
 	char **szIdmapBackend;
 	char *szAddShareCommand;
 	char *szChangeShareCommand;
@@ -1273,6 +1274,7 @@
 	{"winbind max idle children", P_INTEGER, P_GLOBAL, &Globals.winbind_max_idle_children, NULL, NULL, FLAG_ADVANCED}, 
 	{"winbind nss info", P_LIST, P_GLOBAL, &Globals.szWinbindNssInfo, NULL, NULL, FLAG_ADVANCED}, 
 	{"winbind refresh tickets", P_BOOL, P_GLOBAL, &Globals.bWinbindRefreshTickets, NULL, NULL, FLAG_ADVANCED}, 
+	{"winbind offline logon", P_BOOL, P_GLOBAL, &Globals.bWinbindOfflineLogon, NULL, NULL, FLAG_ADVANCED},
 
 	{NULL,  P_BOOL,  P_NONE,  NULL,  NULL,  NULL,  0}
 };
@@ -1619,6 +1621,7 @@
 	Globals.winbind_max_idle_children = 3;
 	Globals.szWinbindNssInfo = str_list_make("template", NULL);
 	Globals.bWinbindRefreshTickets = False;
+	Globals.bWinbindOfflineLogon = False;
 
 	Globals.bPassdbExpandExplicit = True;
 
@@ -1827,8 +1830,8 @@
 FN_GLOBAL_BOOL(lp_winbind_trusted_domains_only, &Globals.bWinbindTrustedDomainsOnly)
 FN_GLOBAL_BOOL(lp_winbind_nested_groups, &Globals.bWinbindNestedGroups)
 FN_GLOBAL_BOOL(lp_winbind_refresh_tickets, &Globals.bWinbindRefreshTickets)
+FN_GLOBAL_BOOL(lp_winbind_offline_logon, &Globals.bWinbindOfflineLogon)
 
-
 FN_GLOBAL_LIST(lp_idmap_backend, &Globals.szIdmapBackend)
 FN_GLOBAL_BOOL(lp_passdb_expand_explicit, &Globals.bPassdbExpandExplicit)
 



More information about the samba-cvs mailing list