From 45c266baaea8755f1a3c0c4c7a87eb0752848ca2 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 28 Aug 1997 20:59:51 +0000 Subject: includes.h: Make sure REPLACE_GETPASS are wrapped with #ifdefs. nmbsync.c: Make sure REPLACE_GETPASS is defined before including includes.h clientutil.c: Catch null passwords. Fixes for a nmbd crash bug found by Herb Lewis @ SGI. Jermey(jallison@whistle.com) --- source/client/clientutil.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'source/client') diff --git a/source/client/clientutil.c b/source/client/clientutil.c index 000cbba1a78..b4f0849c5fe 100644 --- a/source/client/clientutil.c +++ b/source/client/clientutil.c @@ -428,6 +428,12 @@ BOOL cli_send_login(char *inbuf, char *outbuf, BOOL start_session, BOOL use_setu else pass = (char *)getpass("Password: "); + if(pass == NULL) + { + DEBUG(0, ("cli_send_login : no password available - logon failed.\n")); + return False; + } + if (Protocol >= PROTOCOL_LANMAN1 && use_setup) { fstring pword; -- cgit v1.2.1