[3224] in Release_Engineering

home help back first fref pref prev next nref lref last post

[ericldab@ai.mit.edu: BUG REPORT: ktelnet]

daemon@ATHENA.MIT.EDU (brlewis@MIT.EDU)
Mon Jun 6 11:23:53 1994

From: brlewis@MIT.EDU
Date: Mon, 6 Jun 94 11:23:49 -0400
To: rel-eng@MIT.EDU

The -k option to telnet supposedly allows one to specify the Kerberos
realm of a remote host, bypassing krb_realmofhost().  It doesn't work on
any platform other than Ultrix.  This is not a show-stopper bug, but
fixing it would be nice.

I have reviewed his patch and it is correct.  The fix does not affect
any code outside what appears in the patch.

From: ericldab@ai.mit.edu (Eric McDonald)
To: brlewis@MIT.EDU
Reply-To: ericldab@MIT.EDU
Subject: BUG REPORT: ktelnet
Date: Fri, 03 Jun 94 17:51:30 +45722824


Hi...

I'd like to report a bug in the file /mit/telnet/src/telnet/telnet/main.c

Currently, the extern variable "dst_realm_sz" is defined as a char, when in
fact it is defined as an int in /mit/telnet/src/telnet/libtelnet/kerberos.c.
This causes the "-k" option to fail on this SunOS 4.1.3, and possibly on
other platforms (because the strncpy() copies zero bytes).  Following is a
patch to correct this bug.

*** /tmp/,RCSt1a29774	Mon Jun  6 11:05:24 1994
--- main.c	Mon Jun  6 11:04:31 1994
***************
*** 226,232 ****
  		case 'k':
  #if defined(AUTHENTICATION) && defined(KRB4)
  		    {
! 			extern char *dest_realm, dst_realm_buf[], dst_realm_sz;
  			dest_realm = dst_realm_buf;
  			(void)strncpy(dest_realm, optarg, dst_realm_sz);
  		    }
--- 226,233 ----
  		case 'k':
  #if defined(AUTHENTICATION) && defined(KRB4)
  		    {
! 			extern char *dest_realm, dst_realm_buf[];
! 			extern int dst_realm_sz;
  			dest_realm = dst_realm_buf;
  			(void)strncpy(dest_realm, optarg, dst_realm_sz);
  		    }

home help back first fref pref prev next nref lref last post