summaryrefslogtreecommitdiffstats
path: root/source3/nsswitch/idmap_ad.c
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2007-04-19 23:15:33 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:19:30 -0500
commit39888067e337a937b2bc0794ce851688373fbd01 (patch)
treebeb9617bf4192ec88b14054e51c1f75a11428f9c /source3/nsswitch/idmap_ad.c
parent0829e1ad1c3646efecf50729f493b9ee72ef0517 (diff)
downloadsamba-39888067e337a937b2bc0794ce851688373fbd01.tar.gz
samba-39888067e337a937b2bc0794ce851688373fbd01.tar.xz
samba-39888067e337a937b2bc0794ce851688373fbd01.zip
r22392: Remove leftover potentially segfaulty code.
Check we are online before actually trying to connect anywhere (This used to be commit ff5e0b2986d43de1e88c85783b451fcb9828d6a8)
Diffstat (limited to 'source3/nsswitch/idmap_ad.c')
-rw-r--r--source3/nsswitch/idmap_ad.c11
1 files changed, 5 insertions, 6 deletions
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 */