From efb8113d00a4513c1115640004c0905465d3b673 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 17 Aug 1996 14:27:12 +0000 Subject: - made FAST_SHARE_MODES standard for Linux - you can now press enter after a password prompt with "smbclient -L hostname" and it will use a blank username and password, the same as if you used -U% - changed the wins.dat store code to not go via a string variable (just use fprintf instead) - removed a "unsigned long" that luke put back in, changing it to uint32 to keep 64 bit machines happy. Naughtly luke! - allow guest non-connnected print queue listings so ms client 3 can work (This used to be commit 917160dee69bbc198985b6f3232ca2dcda809d8a) --- source3/client/client.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'source3/client') diff --git a/source3/client/client.c b/source3/client/client.c index a6bb50cb3d..b0e4f4a004 100644 --- a/source3/client/client.c +++ b/source3/client/client.c @@ -2523,7 +2523,7 @@ static void cmd_qinfo(char *inbuf,char *outbuf ) char *p; int rdrcnt, rprcnt; pstring param; - int result_code; + int result_code=0; bzero(param,sizeof(param)); @@ -3037,6 +3037,7 @@ static BOOL send_login(char *inbuf,char *outbuf,BOOL start_session,BOOL use_setu pstring dev; char *p; int numprots; + int tries=0; if (was_null) { @@ -3174,6 +3175,10 @@ static BOOL send_login(char *inbuf,char *outbuf,BOOL start_session,BOOL use_setu else pass = (char *)getpass("Password: "); + /* use a blank username for the 2nd try with a blank password */ + if (tries++ && !*pass) + *username = 0; + if (Protocol >= PROTOCOL_LANMAN1 && use_setup) { fstring pword; -- cgit