diff options
author | Andrew Bartlett <abartlet@samba.org> | 2011-06-09 15:31:03 +1000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2011-06-09 12:40:09 +0200 |
commit | 74eed8f3ed5c333728350df1d23a4318e9104909 (patch) | |
tree | c0e4d64d876400e711bf252b73f4bdb43f0e55c1 /source3/client | |
parent | 0e95311c235929e07fdcfd7153b91ae795a979b9 (diff) | |
download | samba-74eed8f3ed5c333728350df1d23a4318e9104909.tar.gz samba-74eed8f3ed5c333728350df1d23a4318e9104909.tar.bz2 samba-74eed8f3ed5c333728350df1d23a4318e9104909.zip |
s3-param Remove special case for global_myname(), rename to lp_netbios_name()
There is no reason this can't be a normal constant string in the
loadparm system, now that we have lp_set_cmdline() to handle overrides
correctly.
Andrew Bartlett
Diffstat (limited to 'source3/client')
-rw-r--r-- | source3/client/client.c | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/source3/client/client.c b/source3/client/client.c index 209c2cb1c9..b485df7741 100644 --- a/source3/client/client.c +++ b/source3/client/client.c @@ -49,7 +49,6 @@ extern char tar_type; static int port = 0; static char *service; static char *desthost; -static char *calling_name; static bool grepable = false; static char *cmdstr = NULL; const char *cmd_ptr = NULL; @@ -5042,7 +5041,7 @@ static int do_message_op(struct user_auth_info *a_info) status = cli_connect_nb(desthost, have_ip ? &dest_ss : NULL, port ? port : 139, name_type, - calling_name, Undefined, &cli); + lp_netbios_name(), Undefined, &cli); if (!NT_STATUS_IS_OK(status)) { d_printf("Connection to %s failed. Error %s\n", desthost, nt_errstr(status)); return 1; @@ -5097,11 +5096,6 @@ static int do_message_op(struct user_auth_info *a_info) exit(ENOMEM); } - /* initialize the netbios name so we can determine whether or - not it was set by a command line option */ - - set_global_myname( "" ); - /* set default debug level to 1 regardless of what smb.conf sets */ setup_logging( "smbclient", DEBUG_DEFAULT_STDERR ); load_case_tables(); @@ -5247,11 +5241,6 @@ static int do_message_op(struct user_auth_info *a_info) poptGetArg(pc)); } - calling_name = talloc_strdup(frame, global_myname() ); - if (!calling_name) { - exit(ENOMEM); - } - if ( override_logfile ) setup_logging( lp_logfile(), DEBUG_FILE ); @@ -5285,13 +5274,6 @@ static int do_message_op(struct user_auth_info *a_info) } } - if ( strlen(calling_name) != 0 ) { - set_global_myname( calling_name ); - } else { - TALLOC_FREE(calling_name); - calling_name = talloc_strdup(frame, global_myname() ); - } - smb_encrypt = get_cmdline_auth_info_smb_encrypt(auth_info); if (!init_names()) { fprintf(stderr, "init_names() failed\n"); |