selftest: fix check for RODC and RID Set allocation
Stefan (metze) Metzmacher
metze at samba.org
Mon Jan 26 15:34:26 MST 2015
Hi,
can someone please push the attached patch?
Thanks!
metze
-------------- next part --------------
From cbf41a4149e219075e7ea2ebe5df3a8d29eb0988 Mon Sep 17 00:00:00 2001
From: Stefan Metzmacher <metze at samba.org>
Date: Mon, 26 Jan 2015 11:37:09 +0100
Subject: [PATCH] Revert "s3:winbindd: setup domain->dcname in already
add_trusted_domain()"
This reverts commit ce39f5f5518dfa81c2468b60ddd7eb5cfd661389.
---
source3/winbindd/winbindd_ping_dc.c | 23 ++++++++++++++++++++---
source3/winbindd/winbindd_util.c | 33 ---------------------------------
2 files changed, 20 insertions(+), 36 deletions(-)
diff --git a/source3/winbindd/winbindd_ping_dc.c b/source3/winbindd/winbindd_ping_dc.c
index 20291bb..05e8402 100644
--- a/source3/winbindd/winbindd_ping_dc.c
+++ b/source3/winbindd/winbindd_ping_dc.c
@@ -54,13 +54,30 @@ struct tevent_req *winbindd_ping_dc_send(TALLOC_CTX *mem_ctx,
return tevent_req_post(req, ev);
}
if (domain->internal) {
+ const char *d = lp_dnsdomain();
+ const char *n = lp_netbios_name();
+
/*
* Internal domains are passdb based, we can always
* contact them.
*/
- state->dcname = talloc_strdup(state, domain->dcname);
- if (tevent_req_nomem(state->dcname, req)) {
- return tevent_req_post(req, ev);
+
+ if (d != NULL) {
+ char *h;
+ h = strlower_talloc(mem_ctx, n);
+ if (tevent_req_nomem(h, req)) {
+ return tevent_req_post(req, ev);
+ }
+
+ state->dcname = talloc_asprintf(state, "%s.%s", h, d);
+ if (tevent_req_nomem(state->dcname, req)) {
+ return tevent_req_post(req, ev);
+ }
+ } else {
+ state->dcname = talloc_strdup(state, n);
+ if (tevent_req_nomem(state->dcname, req)) {
+ return tevent_req_post(req, ev);
+ }
}
tevent_req_done(req);
diff --git a/source3/winbindd/winbindd_util.c b/source3/winbindd/winbindd_util.c
index 27e0eb9..8dab36e 100644
--- a/source3/winbindd/winbindd_util.c
+++ b/source3/winbindd/winbindd_util.c
@@ -222,39 +222,6 @@ static struct winbindd_domain *add_trusted_domain(const char *domain_name, const
}
}
- if (domain->internal) {
- const char *d = alternative_name;
- const char *n = lp_netbios_name();
-
- /*
- * Internal domains are passdb based, we can always
- * contact them.
- */
-
- if (d != NULL) {
- char *h;
-
- h = strlower_talloc(domain, n);
- if (h == NULL) {
- TALLOC_FREE(domain);
- return NULL;
- }
-
- domain->dcname = talloc_asprintf(domain, "%s.%s", h, d);
- TALLOC_FREE(h);
- if (domain->dcname == NULL) {
- TALLOC_FREE(domain);
- return NULL;
- }
- } else {
- domain->dcname = talloc_strdup(domain, n);
- if (domain->dcname == NULL) {
- TALLOC_FREE(domain);
- return NULL;
- }
- }
- }
-
/* Link to domain list */
DLIST_ADD_END(_domain_list, domain, struct winbindd_domain *);
--
1.9.1
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20150126/529ec4d1/attachment.pgp>
More information about the samba-technical
mailing list