Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 05 Apr 2001 11:00:47 -0700
From:      Nick Sayer <nsayer@quack.kfu.com>
To:        freebsd-current@freebsd.org
Cc:        assar@freebsd.org
Subject:   Some telnet argument cleanup
Message-ID:  <3ACCB2CF.50001@quack.kfu.com>

next in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3ACCB2CF.50001>