diff options
author | brian <brian@FreeBSD.org> | 1997-11-09 22:07:29 +0000 |
---|---|---|
committer | brian <brian@FreeBSD.org> | 1997-11-09 22:07:29 +0000 |
commit | 2b9bf8e847ee672175481e6ae9672a8fb77c6cbe (patch) | |
tree | bf499910d5419dd8e66dc668c6dc489fbf4e7fef /usr.sbin/ppp/auth.c | |
parent | 1fb35097709343deb39e78c2a838bf9a64df4996 (diff) | |
download | FreeBSD-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/auth.c')
-rw-r--r-- | usr.sbin/ppp/auth.c | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/usr.sbin/ppp/auth.c b/usr.sbin/ppp/auth.c index 6b01669..89e4894 100644 --- a/usr.sbin/ppp/auth.c +++ b/usr.sbin/ppp/auth.c @@ -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.19 1997/11/09 14:18:32 brian Exp $ + * $Id: auth.c,v 1.20 1997/11/09 18:51:21 brian Exp $ * * TODO: * o Implement check against with registered IP addresses. @@ -47,20 +47,24 @@ void LocalAuthInit() { - char *p; + if (*VarShortHost == '\0') { + char *p; - if (gethostname(VarShortHost, sizeof(VarShortHost))) { - VarLocalAuth = LOCAL_DENY; - return; - } + if (gethostname(VarShortHost, sizeof(VarShortHost))) { + VarLocalAuth = LOCAL_DENY; + return; + } - p = strchr(VarShortHost, '.'); - if (p) - *p = '\0'; + p = strchr(VarShortHost, '.'); + if (p) + *p = '\0'; + } if (!(mode&(MODE_AUTO|MODE_DEDICATED|MODE_DIRECT))) /* We're allowed in interactive and direct */ VarLocalAuth = LOCAL_AUTH; + else if (VarHaveLocalAuthKey) + VarLocalAuth = *VarLocalAuthKey == '\0' ? LOCAL_AUTH : LOCAL_NO_AUTH; else switch (LocalAuthValidate(SECRETFILE, VarShortHost, "")) { case NOT_FOUND: |