summaryrefslogtreecommitdiffstats
path: root/source/winbindd/winbindd_util.c
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2008-01-25 16:40:17 +0100
committerMichael Adam <obnox@samba.org>2008-01-25 16:43:21 +0100
commitdcd42a1e0642c69348adfaeecef7f7f2f074ac30 (patch)
tree7f31fdbec174bbcb8eeab5a6c7ba853ac4749032 /source/winbindd/winbindd_util.c
parentd5ebfccebb1f1b56b45673a506fcdb414103c43b (diff)
downloadsamba-dcd42a1e0642c69348adfaeecef7f7f2f074ac30.tar.gz
samba-dcd42a1e0642c69348adfaeecef7f7f2f074ac30.tar.xz
samba-dcd42a1e0642c69348adfaeecef7f7f2f074ac30.zip
Fix winbindd_can_contact_domain() on a samba DC.
The check for inbound trusts is invalid when samba is a DC and has a trust with an active directory domain. This effectively prevented tusts with an AD domain on a samba DC from working (unless using "winbindd rpc only"), because an ads_connect() was never performed. Only the rpc-based winbindd methods were working properly. Jerry: Please check! Michael
Diffstat (limited to 'source/winbindd/winbindd_util.c')
-rw-r--r--source/winbindd/winbindd_util.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/source/winbindd/winbindd_util.c b/source/winbindd/winbindd_util.c
index 3d9ede3cdf4..d16b7423a17 100644
--- a/source/winbindd/winbindd_util.c
+++ b/source/winbindd/winbindd_util.c
@@ -1398,10 +1398,13 @@ bool winbindd_can_contact_domain( struct winbindd_domain *domain )
if ( domain->domain_flags & DS_DOMAIN_IN_FOREST )
return True;
- /* We cannot contact the domain if it is running AD and
- we have no inbound trust */
+ /*
+ * On a _member_ server, we cannot contact the domain if it
+ * is running AD and we have no inbound trust.
+ */
- if ( domain->active_directory &&
+ if ( !IS_DC &&
+ domain->active_directory &&
((domain->domain_flags&DS_DOMAIN_DIRECT_INBOUND) != DS_DOMAIN_DIRECT_INBOUND) )
{
DEBUG(10, ("Domain is an AD domain and we have no inbound "