-N option still prompted for password in smbclient -L usage
authorHerb Lewis <herb@samba.org>
Thu, 26 Feb 1998 20:41:05 +0000 (20:41 +0000)
committerHerb Lewis <herb@samba.org>
Thu, 26 Feb 1998 20:41:05 +0000 (20:41 +0000)
source/client/client.c
source/client/clientutil.c

index 94518bee8775cb5cfa7e668a0d7e0f81383b84aa..798dfe577e728c89396c9167fd0279279a25f750 100644 (file)
@@ -40,6 +40,7 @@ extern pstring username;
 extern pstring workgroup;
 char *cmdstr="";
 extern BOOL got_pass;
+extern BOOL no_pass;
 extern BOOL connect_as_printer;
 extern BOOL connect_as_ipc;
 extern struct in_addr ipzero;
@@ -3699,6 +3700,7 @@ static void usage(char *pname)
        break;
       case 'N':
        got_pass = True;
+       no_pass = True;
        break;
       case 'P':
        connect_as_printer = True;
index e2241be23717ea12cf993413283c0f1f8977cff9..8d5e11e4d8c2ce955dbbed15296fd19af7f5d510 100644 (file)
@@ -39,6 +39,7 @@ pstring smb_login_passwd = "";
 pstring username="";
 pstring workgroup=WORKGROUP;
 BOOL got_pass = False;
+BOOL no_pass = False;
 BOOL connect_as_printer = False;
 BOOL connect_as_ipc = False;
 
@@ -661,7 +662,8 @@ BOOL cli_send_login(char *inbuf,char *outbuf,BOOL start_session,BOOL use_setup,
            {
              got_pass = False;
              DEBUG(3,("resending login\n"));
-             goto get_pass;
+             if (! no_pass)
+                 goto get_pass;
            }
              
          DEBUG(0,("Session setup failed for username=%s myname=%s destname=%s   %s\n",