summaryrefslogtreecommitdiff
path: root/source3/client/client.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>1997-10-21 09:39:08 +0000
committerAndrew Tridgell <tridge@samba.org>1997-10-21 09:39:08 +0000
commit60328722098bf291664a8a63a245b35cb96fae28 (patch)
treed2a60526f279ac9782a353519b56d892f2c8e6d7 /source3/client/client.c
parent0891bb6a910841455162876be09a92107cd9df00 (diff)
downloadsamba-60328722098bf291664a8a63a245b35cb96fae28.tar.gz
samba-60328722098bf291664a8a63a245b35cb96fae28.tar.bz2
samba-60328722098bf291664a8a63a245b35cb96fae28.zip
some cleanups in the clientutil.c code.
I'm actually hoping to remove this module completely once we convert nmbd to using the new (much cleaner) clientgen.c smbclient now also reports if it connects as a guest user (This used to be commit 3af8d855facfc436cb4b64fa58aca8c056a5348e)
Diffstat (limited to 'source3/client/client.c')
-rw-r--r--source3/client/client.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/source3/client/client.c b/source3/client/client.c
index 98c7714691..7abdfc886c 100644
--- a/source3/client/client.c
+++ b/source3/client/client.c
@@ -3413,6 +3413,13 @@ static BOOL send_login(char *inbuf,char *outbuf,BOOL start_session,BOOL use_setu
uid = SVAL(inbuf,smb_uid);
}
+ if (SVAL(inbuf, smb_vwv2) & 1)
+ DEBUG(1,("connected as guest "));
+ if (sec_mode & 1)
+ DEBUG(1,("security=user\n"));
+ else
+ DEBUG(1,("security=share\n"));
+
/* now we've got a connection - send a tcon message */
bzero(outbuf,smb_size);
@@ -3520,6 +3527,7 @@ static BOOL send_login(char *inbuf,char *outbuf,BOOL start_session,BOOL use_setu
free(inbuf);
free(outbuf);
}
+
return True;
}
@@ -3693,6 +3701,7 @@ static BOOL send_trans_request(char *outbuf,int trans,
return(True);
}
+
/****************************************************************************
try and browse available connections on a host
****************************************************************************/
@@ -4118,7 +4127,7 @@ static BOOL open_sockets(int port )
strcpy(desthost,host);
}
- if (*myname == 0) {
+ if (!(*myname)) {
get_myname(myname,NULL);
}
strupper(myname);
@@ -4661,7 +4670,7 @@ static void usage(char *pname)
strcpy(workgroup,lp_workgroup());
load_interfaces();
- get_myname(*myname?NULL:myname,NULL);
+ get_myname((*myname)?NULL:myname,NULL);
strupper(myname);
if (tar_type) {