X-Git-Url: http://git.ozlabs.org/?p=ppp.git;a=blobdiff_plain;f=pppd%2Foptions.c;h=3d5e020338d88538d11e94f6ebd06749a7cd0ffc;hp=348d843fb79a3f9864f8db85dc58d32530e30d2a;hb=fe174917ff5bda0788993a27e21bf2451180938a;hpb=c3c8051cf96ed66e210e114813cc5de8eb6d122e diff --git a/pppd/options.c b/pppd/options.c index 348d843..3d5e020 100644 --- a/pppd/options.c +++ b/pppd/options.c @@ -18,7 +18,7 @@ */ #ifndef lint -static char rcsid[] = "$Id: options.c,v 1.17 1995/04/24 05:54:44 paulus Exp $"; +static char rcsid[] = "$Id: options.c,v 1.19 1995/04/27 00:20:16 paulus Exp $"; #endif #include @@ -87,6 +87,7 @@ char remote_name[MAXNAMELEN]; /* Peer's name for authentication */ int usehostname = 0; /* Use hostname for our_name */ int disable_defaultip = 0; /* Don't use hostname for default IP adrs */ char *ipparam = NULL; /* Extra parameter for ip up/down scripts */ +int cryptpap; /* Passwords in pap-secrets are encrypted */ #ifdef _linux_ int idle_time_limit = 0; @@ -162,6 +163,7 @@ static int setlcpechofails __P((char **)); static int setbsdcomp __P((char **)); static int setnobsdcomp __P((void)); static int setipparam __P((char **)); +static int setpapcrypt __P((void)); static int number_option __P((char *, long *, int)); static int readable __P((int fd)); @@ -244,6 +246,7 @@ static struct cmd { {"bsdcomp", 1, setbsdcomp}, /* request BSD-Compress */ {"-bsdcomp", 0, setnobsdcomp}, /* don't allow BSD-Compress */ {"ipparam", 1, setipparam}, /* set ip script parameter */ + {"papcrypt", 0, setpapcrypt}, /* PAP passwords encrypted */ #ifdef _linux_ {"idle-disconnect", 1, setidle}, /* seconds for disconnect of idle IP */ #endif @@ -1247,19 +1250,6 @@ setnetmask(argv) return (1); } -/* - * Return user specified netmask. A value of zero means no netmask has - * been set. - */ -/* ARGSUSED */ -u_int32_t -GetMask(addr) - u_int32_t addr; -{ - return(netmask); -} - - static int setcrtscts() { @@ -1510,10 +1500,10 @@ setbsdcomp(argv) progname); return 0; } - if (rbits != 0 && (rbits < MIN_BSD_BITS || rbits > MAX_BSD_BITS) - || abits != 0 && (abits < MIN_BSD_BITS || abits > MAX_BSD_BITS)) { + if (rbits != 0 && (rbits < BSD_MIN_BITS || rbits > BSD_MAX_BITS) + || abits != 0 && (abits < BSD_MIN_BITS || abits > BSD_MAX_BITS)) { fprintf(stderr, "%s: bsdcomp option values must be 0 or %d .. %d\n", - progname, MIN_BSD_BITS, MAX_BSD_BITS); + progname, BSD_MIN_BITS, BSD_MAX_BITS); return 0; } if (rbits > 0) { @@ -1548,6 +1538,13 @@ setipparam(argv) return 1; } +static int +setpapcrypt() +{ + cryptpap = 1; + return 1; +} + #ifdef _linux_ static int setidle (argv) char **argv;