summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mdw@samba.org>2010-04-26 20:19:36 +0200
committerMatthias Dieter Wallnöfer <mdw@samba.org>2010-04-27 08:09:13 +0200
commit2f339f71bd40484959a7008982b243cef0b06bea (patch)
treebfa7dc5fb50806ff0b1bcdd9055df76587523766
parent2654e34cf092f1ec49e1462b67a10c681da4d3df (diff)
downloadsamba-2f339f71bd40484959a7008982b243cef0b06bea.tar.gz
samba-2f339f71bd40484959a7008982b243cef0b06bea.tar.bz2
samba-2f339f71bd40484959a7008982b243cef0b06bea.zip
s4:wb_cmd_getdcname.c - fix s4 winbind up regarding the new correct "GetAnyDCName" behaviour
We get back "NO_SUCH_DOMAIN" when we query the PDC. This is fine and therefore we use the "logon_server" variable as "dcname".
-rw-r--r--source4/winbind/wb_cmd_getdcname.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source4/winbind/wb_cmd_getdcname.c b/source4/winbind/wb_cmd_getdcname.c
index f1398cd3c7..f3c2482579 100644
--- a/source4/winbind/wb_cmd_getdcname.c
+++ b/source4/winbind/wb_cmd_getdcname.c
@@ -114,6 +114,11 @@ NTSTATUS wb_cmd_getdcname_recv(struct composite_context *c,
struct cmd_getdcname_state *state =
talloc_get_type(c->private_data, struct cmd_getdcname_state);
NTSTATUS status = composite_wait(c);
+ if (NT_STATUS_EQUAL(status, NT_STATUS_NO_SUCH_DOMAIN)) {
+ /* special case: queried DC is PDC */
+ state->g.out.dcname = &state->g.in.logon_server;
+ status = NT_STATUS_OK;
+ }
if (NT_STATUS_IS_OK(status)) {
const char *p = *(state->g.out.dcname);
if (*p == '\\') p += 1;