From b48bd2eb328cbdf179be394f065a365b6189b55b Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Mon, 5 Apr 2004 08:31:58 +0000 Subject: r21: Ensure 'net' follows the behaviour of all other samba client tools, and honours the 'netbios name' in the smb.conf. (This used to be commit 591047c20a06cd94540b3781459c0f1b6f5baa9f) --- source3/utils/net.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'source3') diff --git a/source3/utils/net.c b/source3/utils/net.c index f6d6de0a74..4acb1e79b7 100644 --- a/source3/utils/net.c +++ b/source3/utils/net.c @@ -141,7 +141,7 @@ NTSTATUS connect_to_ipc(struct cli_state **c, struct in_addr *server_ip, } } - nt_status = cli_full_connection(c, opt_requester_name, server_name, + nt_status = cli_full_connection(c, NULL, server_name, server_ip, opt_port, "IPC$", "IPC", opt_user_name, opt_workgroup, @@ -750,10 +750,8 @@ static struct functable net_func[] = { } } - if (!opt_requester_name) { - static fstring myname; - get_myname(myname); - opt_requester_name = myname; + if (opt_requester_name) { + set_global_myname(opt_requester_name); } if (!opt_user_name && getenv("LOGNAME")) { -- cgit