From 39888067e337a937b2bc0794ce851688373fbd01 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Thu, 19 Apr 2007 23:15:33 +0000 Subject: r22392: Remove leftover potentially segfaulty code. Check we are online before actually trying to connect anywhere (This used to be commit ff5e0b2986d43de1e88c85783b451fcb9828d6a8) --- source3/nsswitch/idmap_ad.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'source3') diff --git a/source3/nsswitch/idmap_ad.c b/source3/nsswitch/idmap_ad.c index 9daa0024ea..e15e4b90fb 100644 --- a/source3/nsswitch/idmap_ad.c +++ b/source3/nsswitch/idmap_ad.c @@ -695,9 +695,6 @@ static NTSTATUS nss_sfu_init( struct nss_domain_entry *e ) ad_map_type = WB_POSIX_MAP_SFU; - if ( !ad_idmap_ads ) - return idmap_ad_initialize(NULL); - return NT_STATUS_OK; } @@ -716,9 +713,6 @@ static NTSTATUS nss_rfc2307_init( struct nss_domain_entry *e ) ad_map_type = WB_POSIX_MAP_RFC2307; - if ( !ad_idmap_ads ) - return idmap_ad_initialize(NULL); - return NT_STATUS_OK; } @@ -737,6 +731,11 @@ static NTSTATUS nss_ad_get_info( struct nss_domain_entry *e, { 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 */ -- cgit