summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2007-04-19 23:15:33 +0000
committerSimo Sorce <idra@samba.org>2007-04-19 23:15:33 +0000
commit587c5621c7b4e86edb9fb527660f296345a1cc5f (patch)
tree7166954f77d1017028842bca1ac67911b631ab79
parenta0c40bf76279773a92051b2edfd45a96cfe7373d (diff)
downloadsamba-587c5621c7b4e86edb9fb527660f296345a1cc5f.tar.gz
samba-587c5621c7b4e86edb9fb527660f296345a1cc5f.tar.xz
samba-587c5621c7b4e86edb9fb527660f296345a1cc5f.zip
r22392: Remove leftover potentially segfaulty code.
Check we are online before actually trying to connect anywhere
-rw-r--r--source/nsswitch/idmap_ad.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/source/nsswitch/idmap_ad.c b/source/nsswitch/idmap_ad.c
index 9daa0024ea3..e15e4b90fb8 100644
--- a/source/nsswitch/idmap_ad.c
+++ b/source/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 */