Fix broken net rpc join message when DC can't be found. Ensure we pass in a domain...
authorJeremy Allison <jra@samba.org>
Thu, 21 Aug 2008 22:27:22 +0000 (15:27 -0700)
committerJeremy Allison <jra@samba.org>
Thu, 21 Aug 2008 22:27:22 +0000 (15:27 -0700)
Jeremy.
(This used to be commit 33019fe2b5f521c143fc79edb915eca69b9ed98d)

source3/utils/net_util.c

index eb39c739e704a76d4a2df1a7c7af5ce244d885a4..88850d29df125849db31ea04115f33429fcaacd6 100644 (file)
@@ -476,7 +476,7 @@ bool net_find_pdc(struct sockaddr_storage *server_ss,
 NTSTATUS net_make_ipc_connection(struct net_context *c, unsigned flags,
                                 struct cli_state **pcli)
 {
-       return net_make_ipc_connection_ex(c, NULL, NULL, NULL, flags, pcli);
+       return net_make_ipc_connection_ex(c, c->opt_workgroup, NULL, NULL, flags, pcli);
 }
 
 NTSTATUS net_make_ipc_connection_ex(struct net_context *c ,const char *domain,
@@ -492,7 +492,8 @@ NTSTATUS net_make_ipc_connection_ex(struct net_context *c ,const char *domain,
        if ( !server || !pss ) {
                if (!net_find_server(c, domain, flags, &server_ss,
                                     &server_name)) {
-                       d_fprintf(stderr, "Unable to find a suitable server\n");
+                       d_fprintf(stderr, "Unable to find a suitable server "
+                               "for domain %s\n", domain);
                        nt_status = NT_STATUS_UNSUCCESSFUL;
                        goto done;
                }