svn commit: samba r22903 - in branches: SAMBA_3_0/source/nsswitch SAMBA_3_0_26/source/nsswitch

gd at samba.org gd at samba.org
Tue May 15 13:46:27 GMT 2007


Author: gd
Date: 2007-05-15 13:46:26 +0000 (Tue, 15 May 2007)
New Revision: 22903

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

Log:
Now that we have the on-disc trustdomaincache with type flags we can better
decide whether it's worth to register a krb5 ticket gain handler while users
logon offline.

Guenther

Modified:
   branches/SAMBA_3_0/source/nsswitch/winbindd_pam.c
   branches/SAMBA_3_0_26/source/nsswitch/winbindd_pam.c


Changeset:
Modified: branches/SAMBA_3_0/source/nsswitch/winbindd_pam.c
===================================================================
--- branches/SAMBA_3_0/source/nsswitch/winbindd_pam.c	2007-05-15 13:44:11 UTC (rev 22902)
+++ branches/SAMBA_3_0/source/nsswitch/winbindd_pam.c	2007-05-15 13:46:26 UTC (rev 22903)
@@ -784,6 +784,9 @@
 	NET_USER_INFO_3 *my_info3;
 	time_t kickoff_time, must_change_time;
 	BOOL password_good = False;
+#ifdef HAVE_KRB5
+	struct winbindd_tdc_domain *tdc_domain = NULL;
+#endif
 
 	*info3 = NULL;
 
@@ -894,9 +897,9 @@
 		}
 	
 #ifdef HAVE_KRB5
-		/* FIXME: what else points out that the remote domain is AD ? */
-		if (!strequal(domain->name, domain->alt_name) &&
-		    (state->request.flags & WBFLAG_PAM_KRB5)) {
+		if ((state->request.flags & WBFLAG_PAM_KRB5) &&
+		    ((tdc_domain = wcache_tdc_fetch_domain(state->mem_ctx, name_domain)) != NULL) &&
+		    (tdc_domain->trust_type & DS_DOMAIN_TRUST_TYPE_UPLEVEL)) {
 
 			uid_t uid = -1;
 			const char *cc = NULL;

Modified: branches/SAMBA_3_0_26/source/nsswitch/winbindd_pam.c
===================================================================
--- branches/SAMBA_3_0_26/source/nsswitch/winbindd_pam.c	2007-05-15 13:44:11 UTC (rev 22902)
+++ branches/SAMBA_3_0_26/source/nsswitch/winbindd_pam.c	2007-05-15 13:46:26 UTC (rev 22903)
@@ -812,6 +812,9 @@
 	NET_USER_INFO_3 *my_info3;
 	time_t kickoff_time, must_change_time;
 	BOOL password_good = False;
+#ifdef HAVE_KRB5
+	struct winbindd_tdc_domain *tdc_domain = NULL;
+#endif
 
 	*info3 = NULL;
 
@@ -922,9 +925,9 @@
 		}
 	
 #ifdef HAVE_KRB5
-		/* FIXME: what else points out that the remote domain is AD ? */
-		if (!strequal(domain->name, domain->alt_name) &&
-		    (state->request.flags & WBFLAG_PAM_KRB5)) {
+		if ((state->request.flags & WBFLAG_PAM_KRB5) &&
+		    ((tdc_domain = wcache_tdc_fetch_domain(state->mem_ctx, name_domain)) != NULL) &&
+		    (tdc_domain->trust_type & DS_DOMAIN_TRUST_TYPE_UPLEVEL)) {
 
 			uid_t uid = -1;
 			const char *cc = NULL;



More information about the samba-cvs mailing list