mirror of
https://github.com/samba-team/samba.git
synced 2024-12-25 23:21:54 +03:00
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)
(This used to be commit 45c266baae
)
This commit is contained in:
parent
45f9982930
commit
473c42a194
@ -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;
|
||||
|
@ -308,7 +308,9 @@ extern int innetgr (const char *, const char *, const char *, const char *);
|
||||
#define USE_STATVFS
|
||||
#define USE_GETCWD
|
||||
#define USE_SETSID
|
||||
#ifndef REPLACE_GETPASS
|
||||
#define REPLACE_GETPASS
|
||||
#endif /* REPLACE_GETPASS */
|
||||
#define USE_SIGPROCMASK
|
||||
#endif
|
||||
|
||||
@ -459,7 +461,9 @@ char *mktemp(char *); /* No standard include */
|
||||
#define NO_FSYNC
|
||||
#define USE_GETCWD
|
||||
#define USE_SETSID
|
||||
#ifndef REPLACE_GETPASS
|
||||
#define REPLACE_GETPASS
|
||||
#endif /* REPLACE_GETPASS */
|
||||
#define NO_GETRLIMIT
|
||||
#endif /* CLIX */
|
||||
|
||||
|
@ -20,6 +20,8 @@
|
||||
|
||||
*/
|
||||
|
||||
/* We *must have REPLACE_GETPASS defined here before the includes. */
|
||||
#define REPLACE_GETPASS
|
||||
#include "includes.h"
|
||||
|
||||
extern int ClientNMB;
|
||||
|
Loading…
Reference in New Issue
Block a user