uint32_t trust_flags,
uint32_t trust_attribs,
enum netr_SchannelType secure_channel_type,
+ struct winbindd_domain *routing_domain,
struct winbindd_domain **_d)
{
struct winbindd_domain *domain = NULL;
domain->domain_type = trust_type;
domain->domain_trust_attribs = trust_attribs;
domain->secure_channel_type = secure_channel_type;
+ domain->routing_domain = routing_domain;
sid_copy(&domain->sid, sid);
/* Is this our primary domain ? */
NETR_TRUST_FLAG_OUTBOUND,
0,
SEC_CHAN_NULL,
+ find_default_route_domain(),
&domain);
if (!NT_STATUS_IS_OK(status) &&
!NT_STATUS_EQUAL(status, NT_STATUS_NO_SUCH_DOMAIN))
return false;
}
- ok = set_routing_domain(domain, find_default_route_domain());
- if (!ok) {
- return false;
- }
-
return true;
}
ptrdiff_t extra_len;
bool within_forest = false;
NTSTATUS status;
- bool ok;
/*
* Only when we enumerate our primary domain
trust_flags,
trust_attribs,
SEC_CHAN_NULL,
+ find_default_route_domain(),
&domain);
if (!NT_STATUS_IS_OK(status) &&
!NT_STATUS_EQUAL(status, NT_STATUS_NO_SUCH_DOMAIN))
return;
}
- ok = set_routing_domain(domain, find_default_route_domain());
- if (!ok) {
- DBG_ERR("set_routing_domain failed\n");
- return;
- }
-
p = q + strlen(q) + 1;
}
size_t num_trusts = 0;
int i;
NTSTATUS status;
- bool ok;
/* The only transitive trusts supported by Windows 2003 AD are
(a) Parent-Child, (b) Tree-Root, and (c) Forest. The
dom_list[i].trust_flags,
dom_list[i].trust_attribs,
SEC_CHAN_NULL,
+ find_default_route_domain(),
&d);
if (!NT_STATUS_IS_OK(status) &&
nt_errstr(status));
return;
}
- ok = set_routing_domain(d, find_default_route_domain());
- if (!ok) {
- DBG_ERR("set_routing_domain failed\n");
- return;
- }
}
if (d == NULL) {
continue;
size_t num_trusts = 0;
int i;
NTSTATUS status;
- bool ok;
/* The only transitive trusts supported by Windows 2003 AD are
(a) Parent-Child, (b) Tree-Root, and (c) Forest. The
flags,
attribs,
SEC_CHAN_NULL,
+ find_default_route_domain(),
&d);
if (!NT_STATUS_IS_OK(status) &&
NT_STATUS_EQUAL(status,
nt_errstr(status));
return;
}
- ok = set_routing_domain(
- d, find_default_route_domain());
- if (!ok) {
- DBG_ERR("set_routing_domain failed\n");
- return;
- }
}
if (d == NULL) {
struct winbindd_domain *d = NULL;
uint32_t trust_flags = 0;
NTSTATUS status;
- bool ok;
DEBUG(5, ("wb_imsg_new_trusted_domain\n"));
trust_flags,
info.trust_attributes,
secure_channel_type,
+ find_default_route_domain(),
&d);
if (!NT_STATUS_IS_OK(status) &&
!NT_STATUS_EQUAL(status, NT_STATUS_NO_SUCH_DOMAIN))
TALLOC_FREE(frame);
return;
}
- ok = set_routing_domain(d, find_default_route_domain());
- if (!ok) {
- TALLOC_FREE(frame);
- return;
- }
+
TALLOC_FREE(frame);
}
0, /* trust_flags */
0, /* trust_attribs */
SEC_CHAN_LOCAL,
+ NULL,
&domain);
if (!NT_STATUS_IS_OK(status)) {
DBG_ERR("add_trusted_domain BUILTIN returned %s\n",
trust_flags,
LSA_TRUST_ATTRIBUTE_WITHIN_FOREST,
SEC_CHAN_BDC,
+ NULL,
&domain);
TALLOC_FREE(pdb_domain_info);
if (!NT_STATUS_IS_OK(status)) {
trust_flags,
0, /* trust_attribs */
secure_channel_type,
+ NULL,
&domain);
if (!NT_STATUS_IS_OK(status)) {
DBG_ERR("Failed to add local SAM to "
NETR_TRUST_FLAG_OUTBOUND,
0, /* trust_attribs */
SEC_CHAN_WKSTA,
+ NULL,
&domain);
if (!NT_STATUS_IS_OK(status)) {
DBG_ERR("Failed to add local SAM to "
trust_flags,
domains[i]->trust_attributes,
sec_chan_type,
+ NULL,
&domain);
if (!NT_STATUS_IS_OK(status)) {
DBG_NOTICE("add_trusted_domain returned %s\n",
uint32_t fi;
enum ndr_err_code ndr_err;
struct winbindd_domain *routing_domain = NULL;
- bool ok;
if (domains[i]->trust_type != LSA_TRUST_TYPE_UPLEVEL) {
continue;
NETR_TRUST_FLAG_OUTBOUND,
0,
SEC_CHAN_NULL,
+ routing_domain,
&domain);
if (!NT_STATUS_IS_OK(status)) {
DBG_NOTICE("add_trusted_domain returned %s\n",
if (domain == NULL) {
continue;
}
- ok = set_routing_domain(domain, routing_domain);
- if (!ok) {
- DBG_ERR("set_routing_domain on [%s] to "
- "[%s] failed\n",
- domain->name,
- routing_domain->name);
- return false;
- }
}
}
} else if (IS_DC) {
NETR_TRUST_FLAG_OUTBOUND,
0,
SEC_CHAN_DOMAIN,
+ NULL,
&domain);
if (!NT_STATUS_IS_OK(status)) {
DBG_NOTICE("add_trusted_domain returned %s\n",