From owner-freebsd-bugs Fri Jan 23 18:30:02 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id SAA17082 for freebsd-bugs-outgoing; Fri, 23 Jan 1998 18:30:02 -0800 (PST) (envelope-from owner-freebsd-bugs@FreeBSD.ORG) Received: (from gnats@localhost) by hub.freebsd.org (8.8.8/8.8.8) id SAA17063; Fri, 23 Jan 1998 18:30:01 -0800 (PST) (envelope-from gnats) Received: from cam-mail-relay1.bbnplanet.com (cam-mail-relay1.bbnplanet.com [199.94.215.242]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id SAA16706 for ; Fri, 23 Jan 1998 18:26:07 -0800 (PST) (envelope-from wgianopoulos@raytheon.com) Received: from gatekeeper.ray.com (gatekeeper.ray.com [138.125.162.1]) by cam-mail-relay1.bbnplanet.com (8.8.5/8.8.5) with ESMTP id UAA18159 for ; Fri, 23 Jan 1998 20:46:37 -0500 (EST) Received: (mailer@localhost) by gatekeeper.ray.com (8.8.7/8.8.7) id UAA20788 for ; Fri, 23 Jan 1998 20:42:35 -0500 Received: from remote5.eo.ray.com/138.127.161.105() by gatekeeper.ray.com id sma.885606095.015765; Fri Jan 23 20:41:35 1998 Received: (from wag@localhost) by wagpc.wagbbc (8.8.7/8.8.5) id UAA00453; Fri, 23 Jan 1998 20:41:07 -0500 (EST) Message-Id: <199801240141.UAA00453@wagpc.wagbbc> Date: Fri, 23 Jan 1998 20:41:07 -0500 (EST) From: wgianopoulos@raytheon.com Reply-To: wgianopoulos@raytheon.com To: FreeBSD-gnats-submit@FreeBSD.ORG X-Send-Pr-Version: 3.2 Subject: bin/5557: /usr/sbin/ppp no longer works with SecurID cards Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >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 *** 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: