[testlist] [PR PATCH master 22/22] winbindd: make a connection to our internal AD server to fill in domain->active_directory
github at samba.org
github at samba.org
Mon Sep 7 00:10:49 UTC 2015
From: Andrew Bartlett <abartlet at samba.org>
Change-Id: Ic9f2e5b6be5fcaf5f7e99580fdb5b144dd0c1234
Signed-off-by: Andrew Bartlett <abartlet at samba.org>
---
source3/winbindd/winbindd_cm.c | 20 +++++++++++---------
1 file changed, 11 insertions(+), 9 deletions(-)
diff --git a/source3/winbindd/winbindd_cm.c b/source3/winbindd/winbindd_cm.c
index bef0114..53df54f 100644
--- a/source3/winbindd/winbindd_cm.c
+++ b/source3/winbindd/winbindd_cm.c
@@ -2021,22 +2021,24 @@ static bool set_dc_type_and_flags_trustinfo( struct winbindd_domain *domain )
}
our_domain = find_our_domain();
- result = init_dc_connection(our_domain, false);
-
- if (!NT_STATUS_IS_OK(result)) {
- DEBUG(3,("set_dc_type_and_flags_trustinfo: Not able to make a connection to our domain: %s\n",
- nt_errstr(result)));
- return False;
+
+ mem_ctx = talloc_stackframe();
+
+ if (our_domain->internal) {
+ result = init_dc_connection(our_domain, false);
+
+ if (!NT_STATUS_IS_OK(result)) {
+ DEBUG(3,("set_dc_type_and_flags_trustinfo: Not able to make a connection to our domain: %s\n",
+ nt_errstr(result)));
+ return False;
+ }
}
/* This won't work unless our domain is AD */
-
if ( !our_domain->active_directory ) {
return False;
}
- mem_ctx = talloc_stackframe();
-
if (our_domain->internal) {
result = wb_open_internal_pipe(mem_ctx, &ndr_table_netlogon, &cli);
} else if (!connection_ok(our_domain)) {
--
1.9.1
More information about the testlist
mailing list