Date: Fri, 23 Jan 1998 20:41:07 -0500 (EST) From: wgianopoulos@raytheon.com To: FreeBSD-gnats-submit@FreeBSD.ORG Subject: bin/5557: /usr/sbin/ppp no longer works with SecurID cards Message-ID: <199801240141.UAA00453@wagpc.wagbbc>
next in thread | raw e-mail | index | archive | help
>Number: 5557 >Category: bin >Synopsis: /usr/sbin/ppp no longer works with SecurID cards >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Jan 23 18:30:00 PST 1998 >Last-Modified: >Originator: William A. Gianopoulos >Organization: Raytheon Company >Release: FreeBSD 2.2.5-RELEASE i386 >Environment: FreeBSD wagpc.wagbbc 2.2.5-RELEASE FreeBSD 2.2.5-RELEASE #0: Fri Jan 23 14:03:13 EST 1998 root@myname.my.domain:/usr/src/sys/compile/WAGPC i386 >Description: In version 2.1.7 and previous, it was possible to use /usr/sbin/ppp to automatically dial sites which required use of a on-time password device. This was becuse the close command did not hang up the phone if PPP comunication was never established (this was probably a bug). You used to be able to enter the dial command, and after the dial OK! and login OK! was received, and the remote access server was asking for the on-time key, you could enter the close command and then the term command, then enter the one-time key follwed by the '~p' and everything would work. Now the connection drops when you enter the close command. >How-To-Repeat: >Fix: The follwing code adds a new command 'set mode' which allows you to specify wheteher you want the connection to be in packet mode (ppp) or terminal mode (term) after executing the dial command. This allows automatic dialing to be used in conjuction with one-time password devices: *** Makefile.orig Fri Jan 23 17:33:33 1998 --- Makefile Fri Jan 23 17:34:06 1998 *************** *** 12,16 **** --- 12,17 ---- BINMODE=4550 BINOWN= root BINGRP= network + BINDIR= /usr/sbin .include <bsd.prog.mk> *** command.c.orig Fri Jan 23 17:21:19 1998 --- command.c Fri Jan 23 17:20:52 1998 *************** *** 66,71 **** --- 66,72 ---- extern struct cmdtab const SetCommands[]; extern char *IfDevName; + extern int DialTermMode; struct in_addr ifnetmask; *************** *** 168,174 **** if ((res = DialModem()) == EX_DONE) { sleep(1); ModemTimeout(); ! PacketMode(); break; } else if (res == EX_SIG) return 1; --- 169,178 ---- if ((res = DialModem()) == EX_DONE) { sleep(1); ModemTimeout(); ! if (IsInteractive && DialTermMode) ! TtyTermMode(); ! else ! PacketMode(); break; } else if (res == EX_SIG) return 1; *************** *** 1263,1268 **** --- 1267,1288 ---- static int + SetMode(struct cmdtab const * list, int argc, char **argv) + { + if (argc > 0) { + if (strcmp(*argv, "ppp") == 0) + DialTermMode = 0; + else if (strcmp(*argv, "term") == 0) + DialTermMode = 1; + else + return -1; + return 0; + } + return -1; + } + + + static int SetOpenMode(struct cmdtab const * list, int argc, char **argv) { if (argc > 0) { *************** *** 1310,1315 **** --- 1330,1337 ---- "Set log level", "set log [+|-]value..."}, {"login", NULL, SetVariable, LOCAL_AUTH, "Set login script", "set login chat-script", (void *) VAR_LOGIN}, + {"mode", NULL, SetMode, LOCAL_AUTH, + "Set mode", "set mode [ppp|term]"}, {"mru", NULL, SetInitialMRU, LOCAL_AUTH, "Set Initial MRU value", "set mru value"}, {"mtu", NULL, SetPreferredMTU, LOCAL_AUTH, *** main.c.orig Fri Jan 23 16:55:03 1998 --- main.c Fri Jan 23 17:25:23 1998 *************** *** 79,84 **** --- 79,85 ---- static char if_filename[MAXPATHLEN]; int tunno; static int dial_up; + int DialTermMode; static void TtyInit(int DontWantInt) *************** *** 322,327 **** --- 323,329 ---- char *name; VarTerm = 0; + DialTermMode = 0; name = rindex(argv[0], '/'); LogOpen(name ? name + 1 : argv[0]); *************** *** 789,795 **** if ((res = DialModem()) == EX_DONE) { sleep(1); /* little pause to allow peer starts */ ModemTimeout(); ! PacketMode(); dial_up = FALSE; reconnectState = RECON_UNKNOWN; tries = 0; --- 791,800 ---- if ((res = DialModem()) == EX_DONE) { sleep(1); /* little pause to allow peer starts */ ModemTimeout(); ! if (IsInteractive && DialTermMode) ! TtyTermMode(); ! else ! PacketMode(); dial_up = FALSE; reconnectState = RECON_UNKNOWN; tries = 0; *** systems.c.orig Fri Jan 23 17:27:38 1998 --- systems.c Fri Jan 23 17:29:09 1998 *************** *** 132,138 **** --- 132,140 ---- char line[200]; char filename[200]; int linenum; + extern int DialTermMode; + DialTermMode = 0; fp = NULL; cp = getenv("HOME"); if (cp) { >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199801240141.UAA00453>