From owner-freebsd-current Thu Apr 5 11: 0:52 2001 Delivered-To: freebsd-current@freebsd.org Received: from dargo.talarian.com (dargo.talarian.com [207.5.33.3]) by hub.freebsd.org (Postfix) with ESMTP id 6233437B42C; Thu, 5 Apr 2001 11:00:49 -0700 (PDT) (envelope-from nsayer@quack.kfu.com) Received: from moya.talarian.com (moya.talarian.com [10.4.10.8]) by dargo.talarian.com (Postfix) with ESMTP id BE3A722B10; Thu, 5 Apr 2001 10:59:57 -0700 (PDT) Received: from quack.kfu.com (beast.talarian.com [10.4.10.6]) by moya.talarian.com (Postfix) with ESMTP id 147B936; Thu, 5 Apr 2001 11:00:48 -0700 (PDT) Message-ID: <3ACCB2CF.50001@quack.kfu.com> Date: Thu, 05 Apr 2001 11:00:47 -0700 From: Nick Sayer User-Agent: Mozilla/5.0 (X11; U; FreeBSD 4.3-RC i386; en-US; 0.8) Gecko/20010321 X-Accept-Language: en MIME-Version: 1.0 To: freebsd-current@freebsd.org Cc: assar@freebsd.org Subject: Some telnet argument cleanup Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Since the change was made to telnet to have it attempt autologin and encryption by default, there are some problems with argument handling for telnet. 1. in crypto/telnet/telnet/main.c: case 'l': autologin = 1; if(autologin == 0) autologin = -1; user = optarg; break; The 'if' will never happen, so it should be removed, but the ramifications of this should be thought about harder. The way the code is now, specifying -l will DISable automatic encryption (or rather, it will fail to automatically enable it). This is because later on only if autologin=-1 does the code do encrypt_auto(1); . 2. There are no provisions to disable encryption. -x turns it on. Since it is now on by default, -x becomes redundant, except in cases where it's necessary to repair the -l damage. It would make sense to have -x turn encryption off, except that people may be used to it turning encryption on and may be astonished. Some other letter (-y?) should be added to turn it off. The processing of that option will have to be careful to check to see if autologin is -1 and set it to 1 to insure that it's not automatically enabled later. Perhaps better than the autologin == -1 hack, why not just call encrypt_auto(1); and decrypt_auto(1); once before the options are parsed. Then the user can use -y to disable it if he chooses. Then autologin can start off as 1 and be set to 0 only if the user specifies -K. Having -1 be indicative of an encryption side effect is bizarre. 3. So far as I can tell, none of the changes were synced to the man page. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message