svn commit: samba r22392 - in branches: SAMBA_3_0/source/nsswitch SAMBA_3_0_25/source/nsswitch

idra at samba.org idra at samba.org
Thu Apr 19 23:15:35 GMT 2007


Author: idra
Date: 2007-04-19 23:15:33 +0000 (Thu, 19 Apr 2007)
New Revision: 22392

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

Log:

Remove leftover potentially segfaulty code.
Check we are online before actually trying to connect anywhere


Modified:
   branches/SAMBA_3_0/source/nsswitch/idmap_ad.c
   branches/SAMBA_3_0_25/source/nsswitch/idmap_ad.c


Changeset:
Modified: branches/SAMBA_3_0/source/nsswitch/idmap_ad.c
===================================================================
--- branches/SAMBA_3_0/source/nsswitch/idmap_ad.c	2007-04-19 22:40:32 UTC (rev 22391)
+++ branches/SAMBA_3_0/source/nsswitch/idmap_ad.c	2007-04-19 23:15:33 UTC (rev 22392)
@@ -695,9 +695,6 @@
 	
 	ad_map_type =  WB_POSIX_MAP_SFU;	
 
-	if ( !ad_idmap_ads ) 
-		return idmap_ad_initialize(NULL);
-
 	return NT_STATUS_OK;
 }
 
@@ -716,9 +713,6 @@
 	
 	ad_map_type =  WB_POSIX_MAP_RFC2307;
 
-	if ( !ad_idmap_ads ) 
-		return idmap_ad_initialize(NULL);	
-
 	return NT_STATUS_OK;
 }
 
@@ -737,6 +731,11 @@
 {
 	ADS_STRUCT *ads_internal = NULL;
 
+	/* Only do query if we are online */
+	if (idmap_is_offline())	{
+		return NT_STATUS_FILE_IS_OFFLINE;
+	}
+
 	/* We are assuming that the internal ADS_STRUCT is for the 
 	   same forest as the incoming *ads pointer */
 

Modified: branches/SAMBA_3_0_25/source/nsswitch/idmap_ad.c
===================================================================
--- branches/SAMBA_3_0_25/source/nsswitch/idmap_ad.c	2007-04-19 22:40:32 UTC (rev 22391)
+++ branches/SAMBA_3_0_25/source/nsswitch/idmap_ad.c	2007-04-19 23:15:33 UTC (rev 22392)
@@ -695,9 +695,6 @@
 	
 	ad_map_type =  WB_POSIX_MAP_SFU;	
 
-	if ( !ad_idmap_ads ) 
-		return idmap_ad_initialize(NULL);
-
 	return NT_STATUS_OK;
 }
 
@@ -716,9 +713,6 @@
 	
 	ad_map_type =  WB_POSIX_MAP_RFC2307;
 
-	if ( !ad_idmap_ads ) 
-		return idmap_ad_initialize(NULL);	
-
 	return NT_STATUS_OK;
 }
 
@@ -737,6 +731,11 @@
 {
 	ADS_STRUCT *ads_internal = NULL;
 
+	/* Only do query if we are online */
+	if (idmap_is_offline())	{
+		return NT_STATUS_FILE_IS_OFFLINE;
+	}
+
 	/* We are assuming that the internal ADS_STRUCT is for the 
 	   same forest as the incoming *ads pointer */
 



More information about the samba-cvs mailing list