summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>1997-11-09 14:18:55 +0000
committerbrian <brian@FreeBSD.org>1997-11-09 14:18:55 +0000
commit164425f5cee190963d2f6bc9f9c5fc4181182f8c (patch)
treedd37825b2d0f5f8fda2bf8f5525157e9f00b4536 /usr.sbin/ppp
parent2d2f81e9b5208b95bb5fac829423ec588f2fe578 (diff)
downloadFreeBSD-src-164425f5cee190963d2f6bc9f9c5fc4181182f8c.zip
FreeBSD-src-164425f5cee190963d2f6bc9f9c5fc4181182f8c.tar.gz
Increase chat script sizes to 512
Requested by: Michael Reifenberger <root@totum.plaut.de>
Diffstat (limited to 'usr.sbin/ppp')
-rw-r--r--usr.sbin/ppp/auth.c8
-rw-r--r--usr.sbin/ppp/chat.c8
-rw-r--r--usr.sbin/ppp/defs.h4
-rw-r--r--usr.sbin/ppp/filter.c3
-rw-r--r--usr.sbin/ppp/loadalias.c3
-rw-r--r--usr.sbin/ppp/log.c3
-rw-r--r--usr.sbin/ppp/main.c6
-rw-r--r--usr.sbin/ppp/modem.c37
-rw-r--r--usr.sbin/ppp/route.c3
-rw-r--r--usr.sbin/ppp/server.c4
-rw-r--r--usr.sbin/ppp/systems.c4
-rw-r--r--usr.sbin/ppp/vars.h10
12 files changed, 44 insertions, 49 deletions
diff --git a/usr.sbin/ppp/auth.c b/usr.sbin/ppp/auth.c
index 048ad84..516f92c 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.17 1997/09/09 21:51:38 brian Exp $
+ * $Id: auth.c,v 1.18 1997/10/26 01:02:07 brian Exp $
*
* TODO:
* o Implement check against with registered IP addresses.
@@ -72,7 +72,7 @@ LocalAuthValidate(char *fname, char *system, char *key)
FILE *fp;
int n;
char *vector[3];
- char buff[200];
+ char buff[LINE_LEN];
LOCAL_AUTH_VALID rc;
rc = NOT_FOUND; /* No system entry */
@@ -107,7 +107,7 @@ AuthValidate(char *fname, char *system, char *key)
FILE *fp;
int n;
char *vector[4];
- char buff[200];
+ char buff[LINE_LEN];
char passwd[100];
fp = OpenSecret(fname);
@@ -150,7 +150,7 @@ AuthGetSecret(char *fname, char *system, int len, int setaddr)
FILE *fp;
int n;
char *vector[4];
- char buff[200];
+ char buff[LINE_LEN];
static char passwd[100];
fp = OpenSecret(fname);
diff --git a/usr.sbin/ppp/chat.c b/usr.sbin/ppp/chat.c
index bf537f5..6870af1 100644
--- a/usr.sbin/ppp/chat.c
+++ b/usr.sbin/ppp/chat.c
@@ -18,7 +18,7 @@
* Columbus, OH 43221
* (614)451-1883
*
- * $Id: chat.c,v 1.36 1997/10/29 01:19:39 brian Exp $
+ * $Id: chat.c,v 1.37 1997/11/09 06:22:39 brian Exp $
*
* TODO:
* o Support more UUCP compatible control sequences.
@@ -60,7 +60,7 @@
#endif
-#define IBSIZE 200
+#define IBSIZE LINE_LEN
static int TimeoutSec;
static int abort_next, timeout_next;
@@ -235,7 +235,7 @@ ExpandString(char *str, char *result, int reslen, int sendmode)
return (result);
}
-#define MAXLOGBUFF 200
+#define MAXLOGBUFF LINE_LEN
static char logbuff[MAXLOGBUFF];
static int loglen = 0;
@@ -485,7 +485,7 @@ SendString(char *str)
{
char *cp;
int on;
- char buff[200];
+ char buff[LINE_LEN];
if (abort_next) {
abort_next = 0;
diff --git a/usr.sbin/ppp/defs.h b/usr.sbin/ppp/defs.h
index 546322a..ca20d45 100644
--- a/usr.sbin/ppp/defs.h
+++ b/usr.sbin/ppp/defs.h
@@ -15,7 +15,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * $Id: defs.h,v 1.22 1997/10/26 01:02:33 brian Exp $
+ * $Id: defs.h,v 1.23 1997/10/26 12:42:10 brian Exp $
*
* TODO:
*/
@@ -43,6 +43,8 @@
#define RECONNECT_TRIES 0 /* Default retries on carrier loss */
#define REDIAL_PERIOD 30 /* Default Hold time to redial */
#define NEXT_REDIAL_PERIOD 3 /* Default Hold time to next number redial */
+#define SCRIPT_LEN 512 /* Size of login scripts */
+#define LINE_LEN SCRIPT_LEN /* Size of login scripts */
#define CONFFILE "ppp.conf"
#define LINKUPFILE "ppp.linkup"
diff --git a/usr.sbin/ppp/filter.c b/usr.sbin/ppp/filter.c
index c88c25b..121ae04 100644
--- a/usr.sbin/ppp/filter.c
+++ b/usr.sbin/ppp/filter.c
@@ -17,7 +17,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * $Id: filter.c,v 1.15 1997/10/23 10:09:35 brian Exp $
+ * $Id: filter.c,v 1.16 1997/10/26 01:02:34 brian Exp $
*
* TODO: Shoud send ICMP error message when we discard packets.
*/
@@ -36,6 +36,7 @@
#include "mbuf.h"
#include "log.h"
#include "loadalias.h"
+#include "defs.h"
#include "vars.h"
#include "ipcp.h"
#include "filter.h"
diff --git a/usr.sbin/ppp/loadalias.c b/usr.sbin/ppp/loadalias.c
index b209833..6435f72 100644
--- a/usr.sbin/ppp/loadalias.c
+++ b/usr.sbin/ppp/loadalias.c
@@ -1,5 +1,5 @@
/*
- * $Id: loadalias.c,v 1.8 1997/10/26 01:03:01 brian Exp $
+ * $Id: loadalias.c,v 1.9 1997/11/09 06:22:41 brian Exp $
*/
#include <sys/param.h>
@@ -18,6 +18,7 @@
#include "log.h"
#include "id.h"
#include "loadalias.h"
+#include "defs.h"
#include "vars.h"
#define _PATH_ALIAS "/usr/lib/libalias.so." ## __libalias_version
diff --git a/usr.sbin/ppp/log.c b/usr.sbin/ppp/log.c
index f2d6151..b88483b 100644
--- a/usr.sbin/ppp/log.c
+++ b/usr.sbin/ppp/log.c
@@ -1,5 +1,5 @@
/*
- * $Id: log.c,v 1.18 1997/11/04 01:17:00 brian Exp $
+ * $Id: log.c,v 1.19 1997/11/09 06:22:42 brian Exp $
*/
#include <sys/param.h>
@@ -14,6 +14,7 @@
#include "log.h"
#include "loadalias.h"
#include "command.h"
+#include "defs.h"
#include "vars.h"
static char *LogNames[] = {
diff --git a/usr.sbin/ppp/main.c b/usr.sbin/ppp/main.c
index 36ec955..efe5e0a 100644
--- a/usr.sbin/ppp/main.c
+++ b/usr.sbin/ppp/main.c
@@ -17,7 +17,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * $Id: main.c,v 1.88 1997/11/08 00:28:09 brian Exp $
+ * $Id: main.c,v 1.89 1997/11/09 06:22:43 brian Exp $
*
* TODO:
* o Add commands for traffic summary, version display, etc.
@@ -540,9 +540,7 @@ ReadTty()
char ch;
static int ttystate;
FILE *oVarTerm;
-
-#define MAXLINESIZE 200
- char linebuff[MAXLINESIZE];
+ char linebuff[LINE_LEN];
LogPrintf(LogDEBUG, "termode = %d, netfd = %d, mode = %d\n",
TermMode, netfd, mode);
diff --git a/usr.sbin/ppp/modem.c b/usr.sbin/ppp/modem.c
index 89d0726..2a5ca62 100644
--- a/usr.sbin/ppp/modem.c
+++ b/usr.sbin/ppp/modem.c
@@ -17,7 +17,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * $Id: modem.c,v 1.62 1997/11/08 00:28:09 brian Exp $
+ * $Id: modem.c,v 1.63 1997/11/09 06:22:44 brian Exp $
*
* TODO:
*/
@@ -731,33 +731,24 @@ HangupModem(int flag)
nointr_sleep(1);
}
- /*
- * If we are working as dedicated mode, never close it until we are
- * directed to quit program.
- */
- if (modem >= 0 && (flag || !(mode & MODE_DEDICATED))) {
- if (modem >= 0) {
- char ScriptBuffer[200];
+ if (modem >= 0) {
+ char ScriptBuffer[SCRIPT_LEN];
- strcpy(ScriptBuffer, VarHangupScript); /* arrays are the same size */
+ strcpy(ScriptBuffer, VarHangupScript); /* arrays are the same size */
+ if (flag || !(mode & MODE_DEDICATED)) {
DoChat(ScriptBuffer);
tcflush(modem, TCIOFLUSH);
UnrawModem();
CloseLogicalModem();
+ } else {
+ /*
+ * If we are working as dedicated mode, never close it until we are
+ * directed to quit program.
+ */
+ mbits |= TIOCM_DTR;
+ ioctl(modem, TIOCMSET, &mbits);
+ DoChat(ScriptBuffer);
}
- } else if (modem >= 0) {
- char ScriptBuffer[200];
-
- mbits |= TIOCM_DTR;
-#ifndef notyet
- ioctl(modem, TIOCMSET, &mbits);
-#else
- tcgetattr(modem, &ts);
- cfsetspeed(&ts, IntToSpeed(VarSpeed));
- tcsetattr(modem, TCSADRAIN, &ts);
-#endif
- strcpy(ScriptBuffer, VarHangupScript); /* arrays are the same size */
- DoChat(ScriptBuffer);
}
}
@@ -884,7 +875,7 @@ ModemStartOutput(int fd)
int
DialModem()
{
- char ScriptBuffer[200];
+ char ScriptBuffer[SCRIPT_LEN];
int excode;
strncpy(ScriptBuffer, VarDialScript, sizeof(ScriptBuffer) - 1);
diff --git a/usr.sbin/ppp/route.c b/usr.sbin/ppp/route.c
index b43ca22..8ecb5c8 100644
--- a/usr.sbin/ppp/route.c
+++ b/usr.sbin/ppp/route.c
@@ -17,7 +17,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * $Id: route.c,v 1.22 1997/11/09 03:22:49 brian Exp $
+ * $Id: route.c,v 1.23 1997/11/09 06:22:47 brian Exp $
*
*/
@@ -43,6 +43,7 @@
#include "log.h"
#include "loadalias.h"
#include "command.h"
+#include "defs.h"
#include "vars.h"
#include "id.h"
#include "route.h"
diff --git a/usr.sbin/ppp/server.c b/usr.sbin/ppp/server.c
index 7415e56..abd8ba9 100644
--- a/usr.sbin/ppp/server.c
+++ b/usr.sbin/ppp/server.c
@@ -1,5 +1,5 @@
/*
- * $Id: server.c,v 1.6 1997/10/26 01:03:39 brian Exp $
+ * $Id: server.c,v 1.7 1997/11/09 06:22:47 brian Exp $
*/
#include <sys/param.h>
@@ -20,11 +20,11 @@
#include "log.h"
#include "loadalias.h"
#include "command.h"
+#include "defs.h"
#include "vars.h"
#include "server.h"
#include "log.h"
#include "id.h"
-#include "defs.h"
int server = -2;
diff --git a/usr.sbin/ppp/systems.c b/usr.sbin/ppp/systems.c
index 7ae9fdd..e3f9282 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.19 1997/11/09 06:22:48 brian Exp $
+ * $Id: systems.c,v 1.20 1997/11/09 13:18:18 brian Exp $
*
* TODO:
*/
@@ -69,7 +69,7 @@ SelectSystem(char *name, char *file)
char *cp, *wp;
int n, len;
u_char olauth;
- char line[200];
+ char line[LINE_LEN];
char filename[200];
int linenum;
diff --git a/usr.sbin/ppp/vars.h b/usr.sbin/ppp/vars.h
index db6bb24..864f3bd 100644
--- a/usr.sbin/ppp/vars.h
+++ b/usr.sbin/ppp/vars.h
@@ -15,7 +15,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * $Id: vars.h,v 1.30 1997/09/26 00:23:36 brian Exp $
+ * $Id: vars.h,v 1.31 1997/10/26 01:03:59 brian Exp $
*
* TODO:
*/
@@ -76,8 +76,8 @@ struct pppvars {
FILE *termfp; /* The terminal */
#define DIALUP_REQ 0x01
#define DIALUP_DONE 0x02
- char dial_script[200]; /* Dial script */
- char login_script[200]; /* Login script */
+ char dial_script[SCRIPT_LEN]; /* Dial script */
+ char login_script[SCRIPT_LEN]; /* Login script */
char auth_key[50]; /* PAP/CHAP key */
char auth_name[50]; /* PAP/CHAP system name */
#ifdef HAVE_DES
@@ -87,8 +87,8 @@ struct pppvars {
char phone_copy[200]; /* copy for strsep() */
char *next_phone; /* Next phone from the list */
char *alt_phone; /* Next phone from the list */
- char shostname[MAXHOSTNAMELEN]; /* Local short Host Name */
- char hangup_script[200]; /* Hangup script before modem is closed */
+ char shostname[MAXHOSTNAMELEN]; /* Local short Host Name */
+ char hangup_script[SCRIPT_LEN]; /* Hangup script before modem is closed */
struct aliasHandlers handler; /* Alias function pointers */
};
OpenPOWER on IntegriCloud