summaryrefslogtreecommitdiff
path: root/source3/nsswitch
diff options
context:
space:
mode:
Diffstat (limited to 'source3/nsswitch')
-rw-r--r--source3/nsswitch/winbindd_ads.c3
-rw-r--r--source3/nsswitch/winbindd_cache.c12
-rw-r--r--source3/nsswitch/winbindd_util.c10
3 files changed, 12 insertions, 13 deletions
diff --git a/source3/nsswitch/winbindd_ads.c b/source3/nsswitch/winbindd_ads.c
index 88a7d3ed3b..4daf4ba989 100644
--- a/source3/nsswitch/winbindd_ads.c
+++ b/source3/nsswitch/winbindd_ads.c
@@ -27,6 +27,8 @@
#ifdef HAVE_ADS
+extern struct winbindd_methods msrpc_methods, cache_methods;
+
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_WINBIND
@@ -76,7 +78,6 @@ static ADS_STRUCT *ads_cached_connection(struct winbindd_domain *domain)
status = ads_connect(ads);
if (!ADS_ERR_OK(status) || !ads->config.realm) {
- extern struct winbindd_methods msrpc_methods, cache_methods;
DEBUG(1,("ads_connect for domain %s failed: %s\n",
domain->name, ads_errstr(status)));
ads_destroy(&ads);
diff --git a/source3/nsswitch/winbindd_cache.c b/source3/nsswitch/winbindd_cache.c
index 3fc62df005..cc385a1dd7 100644
--- a/source3/nsswitch/winbindd_cache.c
+++ b/source3/nsswitch/winbindd_cache.c
@@ -26,6 +26,12 @@
#include "includes.h"
#include "winbindd.h"
+extern BOOL opt_nocache;
+extern struct winbindd_methods msrpc_methods;
+extern struct winbindd_methods ads_methods;
+extern BOOL opt_dual_daemon;
+extern BOOL background_process;
+
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_WINBIND
@@ -47,8 +53,6 @@ static struct winbind_cache *wcache;
/* flush the cache */
void wcache_flush_cache(void)
{
- extern BOOL opt_nocache;
-
if (!wcache)
return;
if (wcache->tdb) {
@@ -102,11 +106,9 @@ static struct winbind_cache *get_cache(struct winbindd_domain *domain)
struct winbind_cache *ret = wcache;
if (!domain->backend) {
- extern struct winbindd_methods msrpc_methods;
switch (lp_security()) {
#ifdef HAVE_ADS
case SEC_ADS: {
- extern struct winbindd_methods ads_methods;
/* always obey the lp_security parameter for our domain */
if (domain->primary) {
domain->backend = &ads_methods;
@@ -469,13 +471,11 @@ static struct cache_entry *wcache_fetch(struct winbind_cache *cache,
centry->sequence_number = centry_uint32(centry);
if (centry_expired(domain, kstr, centry)) {
- extern BOOL opt_dual_daemon;
DEBUG(10,("wcache_fetch: entry %s expired for domain %s\n",
kstr, domain->name ));
if (opt_dual_daemon) {
- extern BOOL background_process;
background_process = True;
DEBUG(10,("wcache_fetch: background processing expired entry %s for domain %s\n",
kstr, domain->name ));
diff --git a/source3/nsswitch/winbindd_util.c b/source3/nsswitch/winbindd_util.c
index 9ae24e401f..b9fb49ea7f 100644
--- a/source3/nsswitch/winbindd_util.c
+++ b/source3/nsswitch/winbindd_util.c
@@ -24,6 +24,10 @@
#include "includes.h"
#include "winbindd.h"
+extern DOM_SID global_sid_Builtin;
+extern struct winbindd_methods cache_methods;
+extern struct winbindd_methods passdb_methods;
+
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_WINBIND
@@ -85,8 +89,6 @@ void free_domain_list(void)
static BOOL is_internal_domain(const DOM_SID *sid)
{
- extern DOM_SID global_sid_Builtin;
-
if (sid == NULL)
return False;
@@ -183,7 +185,6 @@ static struct winbindd_domain *add_trusted_domain(const char *domain_name, const
static void add_trusted_domains( struct winbindd_domain *domain )
{
- extern struct winbindd_methods cache_methods;
TALLOC_CTX *mem_ctx;
NTSTATUS result;
time_t t;
@@ -284,9 +285,6 @@ void rescan_trusted_domains( void )
/* Look up global info for the winbind daemon */
BOOL init_domain_list(void)
{
- extern DOM_SID global_sid_Builtin;
- extern struct winbindd_methods cache_methods;
- extern struct winbindd_methods passdb_methods;
struct winbindd_domain *domain;
/* Free existing list */