diff options
author | Volker Lendecke <vl@samba.org> | 2009-12-30 10:25:41 +0100 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2010-01-02 12:09:05 +0100 |
commit | d05e17f875300615c0b8543291e7e021448ddff1 (patch) | |
tree | 4e25e85095f2bcabd3248c3a894a101305a80a7f /source3/winbindd/winbindd_ads.c | |
parent | 504754856eed363dde28cdff821c086754deb7f8 (diff) | |
download | samba-d05e17f875300615c0b8543291e7e021448ddff1.tar.gz samba-d05e17f875300615c0b8543291e7e021448ddff1.tar.bz2 samba-d05e17f875300615c0b8543291e7e021448ddff1.zip |
s3: Introduce domain_is_forest_root() helper function
Hopefully this makes the flag tests a bit more understandable
Diffstat (limited to 'source3/winbindd/winbindd_ads.c')
-rw-r--r-- | source3/winbindd/winbindd_ads.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/source3/winbindd/winbindd_ads.c b/source3/winbindd/winbindd_ads.c index b0ca9b8176..d15fb86d86 100644 --- a/source3/winbindd/winbindd_ads.c +++ b/source3/winbindd/winbindd_ads.c @@ -1263,7 +1263,6 @@ static NTSTATUS trusted_domains(struct winbindd_domain *domain, int i; uint32 flags; struct rpc_pipe_client *cli; - uint32 fr_flags = (NETR_TRUST_FLAG_IN_FOREST | NETR_TRUST_FLAG_TREEROOT); int ret_count; DEBUG(3,("ads: trusted_domains\n")); @@ -1274,9 +1273,7 @@ static NTSTATUS trusted_domains(struct winbindd_domain *domain, query for all trusts. If not, then just look for domain trusts in the target forest */ - if ( domain->primary || - ((domain->domain_flags&fr_flags) == fr_flags) ) - { + if (domain->primary || domain_is_forest_root(domain)) { flags = NETR_TRUST_FLAG_OUTBOUND | NETR_TRUST_FLAG_INBOUND | NETR_TRUST_FLAG_IN_FOREST; @@ -1354,7 +1351,7 @@ static NTSTATUS trusted_domains(struct winbindd_domain *domain, wcache_tdc_add_domain( &d ); ret_count++; - } else if ( (domain->domain_flags&fr_flags) == fr_flags ) { + } else if (domain_is_forest_root(domain)) { /* Check if we already have this record. If * we are following our forest root that is not * our primary domain, we want to keep trust |