diff options
author | Jeremy Allison <jra@samba.org> | 1998-04-25 01:12:08 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 1998-04-25 01:12:08 +0000 |
commit | e7ac86607c80912e55ac7179b100cea22749c16f (patch) | |
tree | 257b85ec9e88be65c95cf82afb1f6e7c4c20e4c7 /source3/client | |
parent | 9189005f7f884123d29c8f27db73687b68c80bb9 (diff) | |
download | samba-e7ac86607c80912e55ac7179b100cea22749c16f.tar.gz samba-e7ac86607c80912e55ac7179b100cea22749c16f.tar.bz2 samba-e7ac86607c80912e55ac7179b100cea22749c16f.zip |
This looks like a big change but really isn't.
It is changing the global variables "myname" and "myworkgroup"
to "global_myname" and "global_myworkgroup" respectively.
This is to make it very explicit when we are messing
with a global (don't ask - it makes the domain client
code much clearer :-).
Jeremy.
(This used to be commit 866406bfe399cf757c8275093dacd5ce4843afa0)
Diffstat (limited to 'source3/client')
-rw-r--r-- | source3/client/client.c | 8 | ||||
-rw-r--r-- | source3/client/clientutil.c | 18 | ||||
-rw-r--r-- | source3/client/smbmount.c | 8 |
3 files changed, 17 insertions, 17 deletions
diff --git a/source3/client/client.c b/source3/client/client.c index 9abdb00350..b7635c1ea3 100644 --- a/source3/client/client.c +++ b/source3/client/client.c @@ -33,7 +33,7 @@ pstring cur_dir = "\\"; pstring cd_path = ""; extern pstring service; extern pstring desthost; -extern pstring myname; +extern pstring global_myname; extern pstring myhostname; extern pstring password; extern pstring username; @@ -3705,7 +3705,7 @@ static void usage(char *pname) } break; case 'n': - strcpy(myname,optarg); + strcpy(global_myname,optarg); break; case 'N': got_pass = True; @@ -3779,8 +3779,8 @@ static void usage(char *pname) strcpy(workgroup,lp_workgroup()); load_interfaces(); - get_myname((*myname)?NULL:myname,NULL); - strupper(myname); + get_myname((*global_myname)?NULL:global_myname,NULL); + strupper(global_myname); if(*new_name_resolve_order) lp_set_name_resolve_order(new_name_resolve_order); diff --git a/source3/client/clientutil.c b/source3/client/clientutil.c index dce34eda2c..ab1b37c72d 100644 --- a/source3/client/clientutil.c +++ b/source3/client/clientutil.c @@ -31,7 +31,7 @@ pstring service=""; pstring desthost=""; -extern pstring myname; +extern pstring global_myname; pstring password = ""; pstring smb_login_passwd = ""; pstring username=""; @@ -331,7 +331,7 @@ BOOL cli_send_session_request(char *inbuf,char *outbuf) /* and my name */ p = outbuf+len; - name_mangle(myname,p,0); + name_mangle(global_myname,p,0); len += name_len(p); /* setup the packet length */ @@ -378,7 +378,7 @@ BOOL cli_send_session_request(char *inbuf,char *outbuf) { int ecode = CVAL(inbuf,4); DEBUG(0,("Session request failed (%d,%d) with myname=%s destname=%s\n", - CVAL(inbuf,0),ecode,myname,desthost)); + CVAL(inbuf,0),ecode,global_myname,desthost)); switch (ecode) { case 0x80: @@ -388,7 +388,7 @@ BOOL cli_send_session_request(char *inbuf,char *outbuf) break; case 0x81: DEBUG(0,("Not listening for calling name\n")); - DEBUG(0,("Try to connect as another name (instead of %s)\n",myname)); + DEBUG(0,("Try to connect as another name (instead of %s)\n",global_myname)); DEBUG(0,("You may find the -n option useful for this\n")); break; case 0x82: @@ -508,7 +508,7 @@ BOOL cli_send_login(char *inbuf,char *outbuf,BOOL start_session,BOOL use_setup, if (CVAL(inbuf,smb_rcls) != 0 || ((int)SVAL(inbuf,smb_vwv0) >= numprots)) { DEBUG(0,("SMBnegprot failed. myname=%s destname=%s - %s \n", - myname,desthost,smb_errstr(inbuf))); + global_myname,desthost,smb_errstr(inbuf))); if (was_null) { free(inbuf); @@ -665,7 +665,7 @@ BOOL cli_send_login(char *inbuf,char *outbuf,BOOL start_session,BOOL use_setup, } DEBUG(0,("Session setup failed for username=%s myname=%s destname=%s %s\n", - username,myname,desthost,smb_errstr(inbuf))); + username,global_myname,desthost,smb_errstr(inbuf))); DEBUG(0,("You might find the -U, -W or -n options useful\n")); DEBUG(0,("Sometimes you have to use `-n USERNAME' (particularly with OS/2)\n")); DEBUG(0,("Some servers also insist on uppercase-only passwords\n")); @@ -882,10 +882,10 @@ BOOL cli_open_sockets(int port ) strcpy(desthost,host); } - if (!(*myname)) { - get_myname(myname,NULL); + if (!(*global_myname)) { + get_myname(global_myname,NULL); } - strupper(myname); + strupper(global_myname); DEBUG(3,("Opening sockets\n")); diff --git a/source3/client/smbmount.c b/source3/client/smbmount.c index bab7430859..cdfeb68064 100644 --- a/source3/client/smbmount.c +++ b/source3/client/smbmount.c @@ -44,7 +44,7 @@ pstring cur_dir = "\\"; pstring cd_path = ""; extern pstring service; extern pstring desthost; -extern pstring myname; +extern pstring global_myname; extern pstring myhostname; extern pstring password; extern pstring username; @@ -818,7 +818,7 @@ static void usage(char *pname) } break; case 'n': - strcpy(myname,optarg); + strcpy(global_myname,optarg); break; case 'N': got_pass = True; @@ -880,8 +880,8 @@ static void usage(char *pname) strcpy(workgroup,lp_workgroup()); load_interfaces(); - get_myname((*myname)?NULL:myname,NULL); - strupper(myname); + get_myname((*global_myname)?NULL:global_myname,NULL); + strupper(global_myname); if (cli_open_sockets(port)) { |