Use rpccli_samr_Connect2() all over the place.
[jra/samba/.git] / source3 / utils / net_domain.c
index 74b35d0d66829ebd8dbd10194f7e3d1cb4b539a4..11099ab233d1bfb9f27df715693f9b33a0b50b66 100644 (file)
@@ -71,8 +71,10 @@ NTSTATUS netdom_leave_domain( TALLOC_CTX *mem_ctx, struct cli_state *cli,
                return status;
        }
 
-       status = rpccli_samr_connect(pipe_hnd, mem_ctx, 
-                       SEC_RIGHTS_MAXIMUM_ALLOWED, &sam_pol);
+       status = rpccli_samr_Connect2(pipe_hnd, mem_ctx,
+                                     pipe_hnd->cli->desthost,
+                                     SEC_RIGHTS_MAXIMUM_ALLOWED,
+                                     &sam_pol);
        if ( !NT_STATUS_IS_OK(status) )
                return status;
 
@@ -240,8 +242,10 @@ NTSTATUS netdom_join_domain( TALLOC_CTX *mem_ctx, struct cli_state *cli,
                return status;
        }
 
-       status = rpccli_samr_connect(pipe_hnd, mem_ctx, 
-                       SEC_RIGHTS_MAXIMUM_ALLOWED, &sam_pol);
+       status = rpccli_samr_Connect2(pipe_hnd, mem_ctx,
+                                     pipe_hnd->cli->desthost,
+                                     SEC_RIGHTS_MAXIMUM_ALLOWED,
+                                     &sam_pol);
        if ( !NT_STATUS_IS_OK(status) )
                return status;