summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp/vars.c
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>1997-11-09 22:07:29 +0000
committerbrian <brian@FreeBSD.org>1997-11-09 22:07:29 +0000
commit2b9bf8e847ee672175481e6ae9672a8fb77c6cbe (patch)
treebf499910d5419dd8e66dc668c6dc489fbf4e7fef /usr.sbin/ppp/vars.c
parent1fb35097709343deb39e78c2a838bf9a64df4996 (diff)
downloadFreeBSD-src-2b9bf8e847ee672175481e6ae9672a8fb77c6cbe.zip
FreeBSD-src-2b9bf8e847ee672175481e6ae9672a8fb77c6cbe.tar.gz
Don't create a diagnostic socket by default.
Allow a password spec on the "set server" command line. Use SIGUSR2 to close the diagnostic socket. Some man page corrections.
Diffstat (limited to 'usr.sbin/ppp/vars.c')
-rw-r--r--usr.sbin/ppp/vars.c39
1 files changed, 21 insertions, 18 deletions
diff --git a/usr.sbin/ppp/vars.c b/usr.sbin/ppp/vars.c
index 9041132..1a47b37 100644
--- a/usr.sbin/ppp/vars.c
+++ b/usr.sbin/ppp/vars.c
@@ -17,7 +17,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * $Id: vars.c,v 1.31 1997/10/26 01:03:58 brian Exp $
+ * $Id: vars.c,v 1.32 1997/10/29 01:19:51 brian Exp $
*
*/
#include <sys/param.h>
@@ -40,7 +40,7 @@
#include "defs.h"
char VarVersion[] = "PPP Version 1.3";
-char VarLocalVersion[] = "$Date: 1997/10/26 01:03:58 $";
+char VarLocalVersion[] = "$Date: 1997/10/29 01:19:51 $";
int Utmp = 0;
int ipInOctets = 0;
int ipOutOctets = 0;
@@ -172,21 +172,24 @@ LocalAuthCommand(struct cmdtab * list, int argc, char **argv)
else
pass = *argv;
- switch (LocalAuthValidate(SECRETFILE, VarShortHost, pass)) {
- case INVALID:
- pppVars.lauth = LOCAL_NO_AUTH;
- break;
- case VALID:
- pppVars.lauth = LOCAL_AUTH;
- break;
- case NOT_FOUND:
- pppVars.lauth = LOCAL_AUTH;
- LogPrintf(LogWARN, "WARNING: No Entry for this system\n");
- break;
- default:
- pppVars.lauth = LOCAL_NO_AUTH;
- LogPrintf(LogERROR, "LocalAuthCommand: Ooops?\n");
- return 1;
- }
+ if (VarHaveLocalAuthKey)
+ VarLocalAuth = strcmp(VarLocalAuthKey, pass) ? LOCAL_NO_AUTH : LOCAL_AUTH;
+ else
+ switch (LocalAuthValidate(SECRETFILE, VarShortHost, pass)) {
+ case INVALID:
+ VarLocalAuth = LOCAL_NO_AUTH;
+ break;
+ case VALID:
+ VarLocalAuth = LOCAL_AUTH;
+ break;
+ case NOT_FOUND:
+ VarLocalAuth = LOCAL_AUTH;
+ LogPrintf(LogWARN, "WARNING: No Entry for this system\n");
+ break;
+ default:
+ VarLocalAuth = LOCAL_NO_AUTH;
+ LogPrintf(LogERROR, "LocalAuthCommand: Ooops?\n");
+ return 1;
+ }
return 0;
}
OpenPOWER on IntegriCloud