summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp/systems.c
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>1997-11-04 01:17:05 +0000
committerbrian <brian@FreeBSD.org>1997-11-04 01:17:05 +0000
commitbd52968d26311964fedc5301c206df302f372273 (patch)
treef001d2d5c1ea74b74efa5b0b9686fae06243301a /usr.sbin/ppp/systems.c
parent9e1a11429b69867cc575ecf805ef1c0c4ae8ba42 (diff)
downloadFreeBSD-src-bd52968d26311964fedc5301c206df302f372273.zip
FreeBSD-src-bd52968d26311964fedc5301c206df302f372273.tar.gz
Introduce [local] to "set log [local] ...". This spits
logging out to the screen in terminal mode - should be good for installation problem diagnosis.
Diffstat (limited to 'usr.sbin/ppp/systems.c')
-rw-r--r--usr.sbin/ppp/systems.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/usr.sbin/ppp/systems.c b/usr.sbin/ppp/systems.c
index 4eddc6f..79ca8a8 100644
--- a/usr.sbin/ppp/systems.c
+++ b/usr.sbin/ppp/systems.c
@@ -17,7 +17,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * $Id: systems.c,v 1.16 1997/09/04 00:38:21 brian Exp $
+ * $Id: systems.c,v 1.17 1997/10/26 01:03:48 brian Exp $
*
* TODO:
*/
@@ -139,7 +139,7 @@ SelectSystem(char *name, char *file)
{
FILE *fp;
char *cp, *wp;
- int n;
+ int n, len;
u_char olauth;
char line[200];
char filename[200];
@@ -189,12 +189,19 @@ SelectSystem(char *name, char *file)
if (*cp == ' ' || *cp == '\t') {
n = strspn(cp, " \t");
cp += n;
+ len = strlen(cp);
+ if (!len)
+ continue;
+ if (cp[len-1] == '\n')
+ cp[--len] = '\0';
+ if (!len)
+ continue;
LogPrintf(LogCOMMAND, "%s: %s\n", name, cp);
SetPppId();
olauth = VarLocalAuth;
if (VarLocalAuth == LOCAL_NO_AUTH)
VarLocalAuth = LOCAL_AUTH;
- DecodeCommand(cp, strlen(cp), 0);
+ DecodeCommand(cp, len, 0);
VarLocalAuth = olauth;
SetUserId();
} else if (*cp == '#') {
OpenPOWER on IntegriCloud