summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRalph Boehme <slow@samba.org>2017-11-28 17:46:03 +0100
committerKarolin Seeger <kseeger@samba.org>2018-01-13 12:55:08 +0100
commitf12a43f4876b4a6bf556ea760ffe8e21f2acacf8 (patch)
tree36c88ccb689af06f209075958e7cb2bd13b5fb63
parent09021f920faba4dc4d2b2e1c0d3d4432e1a759d5 (diff)
downloadsamba-f12a43f4876b4a6bf556ea760ffe8e21f2acacf8.tar.gz
winbindd: fix trust_is_oubound()
A trust is only inbound if NETR_TRUST_FLAG_OUTBOUND is set. Trust flags = 0x0 does not imply an outbound trust, nor does NETR_TRUST_FLAG_IN_FOREST. Signed-off-by: Ralph Boehme <slow@samba.org>
-rw-r--r--source3/winbindd/winbindd_misc.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/source3/winbindd/winbindd_misc.c b/source3/winbindd/winbindd_misc.c
index 051e9515f31..d2741cb6b6f 100644
--- a/source3/winbindd/winbindd_misc.c
+++ b/source3/winbindd/winbindd_misc.c
@@ -68,11 +68,10 @@ static bool trust_is_inbound(struct winbindd_tdc_domain *domain)
static bool trust_is_outbound(struct winbindd_tdc_domain *domain)
{
- return (domain->trust_flags == 0x0) ||
- ((domain->trust_flags & NETR_TRUST_FLAG_IN_FOREST) ==
- NETR_TRUST_FLAG_IN_FOREST) ||
- ((domain->trust_flags & NETR_TRUST_FLAG_OUTBOUND) ==
- NETR_TRUST_FLAG_OUTBOUND);
+ if (domain->trust_flags & NETR_TRUST_FLAG_OUTBOUND) {
+ return true;
+ }
+ return false;
}
static bool trust_is_transitive(struct winbindd_tdc_domain *domain)