summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>1998-07-19 21:07:24 +0000
committerbrian <brian@FreeBSD.org>1998-07-19 21:07:24 +0000
commit0997d0dc6ac5ea15796e155999dc49f8ef6de70e (patch)
treea4114edc7aa11d17c5c04ded4b0c22e63dfcc67b /usr.sbin/ppp
parentf2d843cbf5545ec2d7be42e50ecf868758572a50 (diff)
downloadFreeBSD-src-0997d0dc6ac5ea15796e155999dc49f8ef6de70e.zip
FreeBSD-src-0997d0dc6ac5ea15796e155999dc49f8ef6de70e.tar.gz
Add missing braces - without them, the IP & label were mis-selected
from ppp.secret. Problem reported by: Dom Mitchell <dom@phmit.demon.co.uk>
Diffstat (limited to 'usr.sbin/ppp')
-rw-r--r--usr.sbin/ppp/auth.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/usr.sbin/ppp/auth.c b/usr.sbin/ppp/auth.c
index 2442017..420a32b 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.29 1998/05/21 21:44:00 brian Exp $
+ * $Id: auth.c,v 1.30 1998/06/15 19:06:35 brian Exp $
*
* TODO:
* o Implement check against with registered IP addresses.
@@ -104,23 +104,20 @@ auth_Select(struct bundle *bundle, const char *name, struct physical *physical)
while (fgets(buff, sizeof buff, fp)) {
if (buff[0] == '#')
continue;
- buff[strlen(buff) - 1] = 0;
+ buff[strlen(buff) - 1] = '\0';
memset(vector, '\0', sizeof vector);
n = MakeArgs(buff, vector, VECSIZE(vector));
if (n < 2)
continue;
- if (strcmp(vector[0], name) == 0)
+ if (strcmp(vector[0], name) == 0) {
CloseSecret(fp);
-/*
- memset(&bundle->ncp.ipcp.cfg.peer_range, '\0',
- sizeof bundle->ncp.ipcp.cfg.peer_range);
-*/
if (n > 2 && !ipcp_UseHisaddr(bundle, vector[2], 1))
return 0;
ipcp_Setup(&bundle->ncp.ipcp);
if (n > 3)
bundle_SetLabel(bundle, vector[3]);
return 1; /* Valid */
+ }
}
CloseSecret(fp);
}
OpenPOWER on IntegriCloud