1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-27 03:21:53 +03:00

r5527: Allow own netbios name to be set in smbclient's session setup.

Guenther
(This used to be commit 3660b7e64d)
This commit is contained in:
Günther Deschner 2005-02-24 00:11:42 +00:00 committed by Gerald (Jerry) Carter
parent 9150205f98
commit 9fa9ca4f8b

View File

@ -37,6 +37,7 @@ static pstring service;
static pstring desthost;
static pstring username;
static pstring password;
static pstring calling_name;
static BOOL use_kerberos;
static BOOL got_pass;
static BOOL grepable=False;
@ -137,7 +138,7 @@ static struct cli_state *do_connect( const char *server, const char *share,
zero_ip(&ip);
make_nmb_name(&calling, global_myname(), 0x0);
make_nmb_name(&calling, calling_name, 0x0);
make_nmb_name(&called , server, name_type);
again:
@ -3454,7 +3455,7 @@ static int do_message_op(void)
fstring server_name;
char name_type_hex[10];
make_nmb_name(&calling, global_myname(), 0x0);
make_nmb_name(&calling, calling_name, 0x0);
make_nmb_name(&called , desthost, name_type);
fstrcpy(server_name, desthost);
@ -3538,6 +3539,7 @@ static int do_message_op(void)
not it was set by a command line option */
set_global_myworkgroup( "" );
set_global_myname( "" );
/* set default debug level to 0 regardless of what smb.conf sets */
setup_logging( "smbclient", True );
@ -3632,6 +3634,7 @@ static int do_message_op(void)
everything)? */
fstrcpy( new_workgroup, lp_workgroup() );
pstrcpy( calling_name, global_myname() );
if ( override_logfile )
setup_logging( lp_logfile(), False );
@ -3646,6 +3649,9 @@ static int do_message_op(void)
if ( strlen(new_workgroup) != 0 )
set_global_myworkgroup( new_workgroup );
if ( strlen(calling_name) != 0 )
set_global_myname( calling_name );
if(poptPeekArg(pc)) {
pstrcpy(service,poptGetArg(pc));
/* Convert any '/' characters in the service name to '\' characters */