diff options
author | brian <brian@FreeBSD.org> | 1997-11-22 03:37:54 +0000 |
---|---|---|
committer | brian <brian@FreeBSD.org> | 1997-11-22 03:37:54 +0000 |
commit | a7f001c816c9390acda1c72f889fd110f8d75563 (patch) | |
tree | 876d508224fb0bc9435a2e3b83f73719b56ad0b6 /usr.sbin/ppp/auth.c | |
parent | 13d351d26116b6bf544f619e0de396a53d47ccd1 (diff) | |
download | FreeBSD-src-a7f001c816c9390acda1c72f889fd110f8d75563.zip FreeBSD-src-a7f001c816c9390acda1c72f889fd110f8d75563.tar.gz |
Fix prototypes.
Remove extraneous decls.
Add ``const'' to several places.
Allow ``make NOALIAS=1'' to remove IP aliasing.
Merge with OpenBSD - only the Makefiles vary.
We can now survive a compile with
-Wall -Wbad-function-cast -Wcast-align -Wcast-qual
-Winline -Wmissing-declarations -Wmissing-prototypes
-Wnested-externs -Wpointer-arith -Wredundant-decls
-Wshadow -Wstrict-prototypes -Wwrite-strings -Wchar-subscripts
(although the Makefile just contains -Wall).
Diffstat (limited to 'usr.sbin/ppp/auth.c')
-rw-r--r-- | usr.sbin/ppp/auth.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/usr.sbin/ppp/auth.c b/usr.sbin/ppp/auth.c index 1a6758c..1d9d1d7 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.22 1997/11/11 22:58:09 brian Exp $ + * $Id: auth.c,v 1.23 1997/11/17 00:42:37 brian Exp $ * * TODO: * o Implement check against with registered IP addresses. @@ -29,6 +29,7 @@ #include <string.h> #include <unistd.h> +#include "command.h" #include "mbuf.h" #include "log.h" #include "defs.h" @@ -37,7 +38,6 @@ #include "lcpproto.h" #include "ipcp.h" #include "loadalias.h" -#include "command.h" #include "vars.h" #include "filter.h" #include "auth.h" @@ -67,7 +67,7 @@ LocalAuthInit() } LOCAL_AUTH_VALID -LocalAuthValidate(char *fname, char *system, char *key) +LocalAuthValidate(const char *fname, const char *system, const char *key) { FILE *fp; int n; @@ -102,7 +102,7 @@ LocalAuthValidate(char *fname, char *system, char *key) } int -AuthValidate(char *fname, char *system, char *key) +AuthValidate(const char *fname, const char *system, const char *key) { FILE *fp; int n; @@ -128,7 +128,7 @@ AuthValidate(char *fname, char *system, char *key) memset(&DefHisAddress, '\0', sizeof(DefHisAddress)); n -= 2; if (n > 0) { - if (ParseAddr(n--, &vector[2], + if (ParseAddr(n--, (char const *const *)(vector+2), &DefHisAddress.ipaddr, &DefHisAddress.mask, &DefHisAddress.width) == 0) { @@ -145,7 +145,7 @@ AuthValidate(char *fname, char *system, char *key) } char * -AuthGetSecret(char *fname, char *system, int len, int setaddr) +AuthGetSecret(const char *fname, const char *system, int len, int setaddr) { FILE *fp; int n; @@ -172,7 +172,7 @@ AuthGetSecret(char *fname, char *system, int len, int setaddr) n -= 2; if (n > 0 && setaddr) { LogPrintf(LogDEBUG, "AuthGetSecret: n = %d, %s\n", n, vector[2]); - if (ParseAddr(n--, &vector[2], + if (ParseAddr(n--, (char const *const *)(vector+2), &DefHisAddress.ipaddr, &DefHisAddress.mask, &DefHisAddress.width) != 0) @@ -186,9 +186,10 @@ AuthGetSecret(char *fname, char *system, int len, int setaddr) } static void -AuthTimeout(struct authinfo *authp) +AuthTimeout(void *vauthp) { struct pppTimer *tp; + struct authinfo *authp = (struct authinfo *)vauthp; tp = &authp->authtimer; StopTimer(tp); |