git.samba.org
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
89cc31f
)
s3:winbindd: report our own name for PING_DC and internal domains
author
Stefan Metzmacher
<metze@samba.org>
Wed, 10 Dec 2014 12:25:55 +0000
(12:25 +0000)
committer
Stefan Metzmacher
<metze@samba.org>
Fri, 19 Dec 2014 12:15:12 +0000
(13:15 +0100)
This means "wbinfo --ping-dc" works fine on a DC.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source3/winbindd/winbindd_ping_dc.c
patch
|
blob
|
history
diff --git
a/source3/winbindd/winbindd_ping_dc.c
b/source3/winbindd/winbindd_ping_dc.c
index 0a767d9e12d277692c52c7ff3d622534e3e57bad..b5a697779bc7ede9325c2e0a979d8e1732b5faa7 100644
(file)
--- a/
source3/winbindd/winbindd_ping_dc.c
+++ b/
source3/winbindd/winbindd_ping_dc.c
@@
-54,10
+54,32
@@
struct tevent_req *winbindd_ping_dc_send(TALLOC_CTX *mem_ctx,
return tevent_req_post(req, ev);
}
if (domain->internal) {
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.
*/
/*
* Internal domains are passdb based, we can always
* contact them.
*/
+
+ 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);
return tevent_req_post(req, ev);
}
tevent_req_done(req);
return tevent_req_post(req, ev);
}