Don't ask for a password if it's specified as empty.

This commit is contained in:
Brian Somers 1997-11-09 18:51:23 +00:00
parent 2d77cf0b00
commit d025849c64
3 changed files with 17 additions and 7 deletions

View File

@ -17,7 +17,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
* $Id: auth.c,v 1.18 1997/10/26 01:02:07 brian Exp $
* $Id: auth.c,v 1.19 1997/11/09 14:18:32 brian Exp $
*
* TODO:
* o Implement check against with registered IP addresses.
@ -62,8 +62,17 @@ LocalAuthInit()
/* We're allowed in interactive and direct */
VarLocalAuth = LOCAL_AUTH;
else
VarLocalAuth = LocalAuthValidate(SECRETFILE, VarShortHost, "")
== NOT_FOUND ? LOCAL_DENY : LOCAL_NO_AUTH;
switch (LocalAuthValidate(SECRETFILE, VarShortHost, "")) {
case NOT_FOUND:
VarLocalAuth = LOCAL_DENY;
break;
case VALID:
VarLocalAuth = LOCAL_AUTH;
break;
case INVALID:
VarLocalAuth = LOCAL_NO_AUTH;
break;
}
}
LOCAL_AUTH_VALID

View File

@ -17,7 +17,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
* $Id: command.c,v 1.92 1997/11/09 06:22:39 brian Exp $
* $Id: command.c,v 1.93 1997/11/09 17:51:24 brian Exp $
*
*/
#include <sys/param.h>
@ -67,6 +67,7 @@
#include "ccp.h"
#include "ip.h"
#include "slcompress.h"
#include "auth.h"
struct in_addr ifnetmask;
@ -760,7 +761,7 @@ QuitCommand(struct cmdtab const * list, int argc, char **argv)
Cleanup(EX_NORMAL);
} else if (VarTerm) {
LogPrintf(LogPHASE, "Client connection closed.\n");
VarLocalAuth = LOCAL_NO_AUTH;
LocalAuthInit();
mode &= ~MODE_INTER;
oVarTerm = VarTerm;
VarTerm = 0;

View File

@ -17,7 +17,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
* $Id: main.c,v 1.89 1997/11/09 06:22:43 brian Exp $
* $Id: main.c,v 1.90 1997/11/09 14:18:45 brian Exp $
*
* TODO:
* o Add commands for traffic summary, version display, etc.
@ -560,7 +560,7 @@ ReadTty()
Prompt();
} else {
LogPrintf(LogPHASE, "client connection closed.\n");
VarLocalAuth = LOCAL_NO_AUTH;
LocalAuthInit();
mode &= ~MODE_INTER;
oVarTerm = VarTerm;
VarTerm = 0;