r21: Ensure 'net' follows the behaviour of all other samba client tools,
authorAndrew Bartlett <abartlet@samba.org>
Mon, 5 Apr 2004 08:31:58 +0000 (08:31 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 15:51:03 +0000 (10:51 -0500)
and honours the 'netbios name' in the smb.conf.

source/utils/net.c

index f6d6de0a74f350046a2c5dcc155e32075d54c501..4acb1e79b746f11967b0098ebf7605d50b417dcd 100644 (file)
@@ -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")) {