diff options
author | Günther Deschner <gd@samba.org> | 2004-08-26 21:37:20 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 10:52:30 -0500 |
commit | e4c4d91896f08dadf3bc52e067941adb60de0e00 (patch) | |
tree | e344af7ca838af37fb0d00c76876e747400de6c3 /source3/utils/net_rpc.c | |
parent | f5a2dd73da452bec1fcdaa60a8460b35a43ba3dc (diff) | |
download | samba-e4c4d91896f08dadf3bc52e067941adb60de0e00.tar.gz samba-e4c4d91896f08dadf3bc52e067941adb60de0e00.tar.xz samba-e4c4d91896f08dadf3bc52e067941adb60de0e00.zip |
r2080: Remove last traces of static migration to localhost. Needed to allow a
local netbios-alias bound to non-loopback interface as a migration target.
It's now possible to migrate printers|shares|files from Server A to
Server B while running the net-command on client C.
Guenther
(This used to be commit 0cfd2866dfe5e959ede169a77c39480790300de3)
Diffstat (limited to 'source3/utils/net_rpc.c')
-rw-r--r-- | source3/utils/net_rpc.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c index 26bcb51fa5..1a1d76b09a 100644 --- a/source3/utils/net_rpc.c +++ b/source3/utils/net_rpc.c @@ -2534,7 +2534,7 @@ rpc_share_migrate_shares_internals(const DOM_SID *domain_sid, const char *domain goto done; /* connect local PI_SRVSVC */ - nt_status = connect_local_pipe(&cli_dst, PI_SRVSVC, &got_dst_srvsvc_pipe); + nt_status = connect_pipe(&cli_dst, PI_SRVSVC, &got_dst_srvsvc_pipe); if (!NT_STATUS_IS_OK(nt_status)) return nt_status; @@ -2802,7 +2802,9 @@ rpc_share_migrate_files_internals(const DOM_SID *domain_sid, const char *domain_ BOOL got_src_share = False; BOOL got_dst_share = False; pstring mask; - extern struct in_addr loopback_ip; + char *dst = NULL; + + dst = strdup(opt_destination?opt_destination:"127.0.0.1"); init_enum_hnd(&hnd, 0); @@ -2872,8 +2874,8 @@ rpc_share_migrate_files_internals(const DOM_SID *domain_sid, const char *domain_ /* open share destination */ - nt_status = connect_to_service(&cli_share_dst, &loopback_ip, - "127.0.0.1", netname, "A:"); + nt_status = connect_to_service(&cli_share_dst, NULL, + dst, netname, "A:"); if (!NT_STATUS_IS_OK(nt_status)) goto done; |