From owner-freebsd-bugs Tue Nov 19 6:50:16 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5DC9A37B404 for ; Tue, 19 Nov 2002 06:50:05 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 75BBE43E77 for ; Tue, 19 Nov 2002 06:50:04 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.6/8.12.6) with ESMTP id gAJEo4x3086301 for ; Tue, 19 Nov 2002 06:50:04 -0800 (PST) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.6/8.12.6/Submit) id gAJEo4pi086300; Tue, 19 Nov 2002 06:50:04 -0800 (PST) Date: Tue, 19 Nov 2002 06:50:04 -0800 (PST) Message-Id: <200211191450.gAJEo4pi086300@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: Peter Pentchev Subject: Re: bin/45397: Telnet dumps core when MAKE_KERBEROS5=yes is enabled Reply-To: Peter Pentchev Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org The following reply was made to PR bin/45397; it has been noted by GNATS. From: Peter Pentchev To: Ari Suutari Cc: bug-followup@FreeBSD.org Subject: Re: bin/45397: Telnet dumps core when MAKE_KERBEROS5=yes is enabled Date: Tue, 19 Nov 2002 16:48:22 +0200 On Mon, Nov 18, 2002 at 01:00:39PM +0200, Ari Suutari wrote: > > >Number: 45397 > >Category: bin > >Synopsis: Telnet dumps core when MAKE_KERBEROS5=yes is enabled > >Originator: Ari Suutari > >Release: FreeBSD 4.7-STABLE i386 > >Organization: > Syncron Tech Oy > >Environment: > System: FreeBSD guinness.syncrontech.com 4.7-STABLE FreeBSD 4.7-STABLE #3: Fri Nov 15 15:26:45 EET 2002 ari@pommac.syncrontech.com:/usr/obj/usr/src/sys/GUINNESS i386 > > > >Description: > > When system is build with MAKE_KERBEROS5 and MAKE_KERBEROS4 set > to yes in /etc/make.conf, the resulting telnet dumps core on systems > that have kerberos 5 configured. Can you try the following patch? It prevents the core dump here, although the authentication hangs after the 'Trying mutual KERBEROS5' message, but then again, the hang could be the result of my misconfiguration: this is my first time trying to configure Kerberos after all :) G'luck, Peter -- Peter Pentchev roam@ringlet.net roam@FreeBSD.org PGP key: http://people.FreeBSD.org/~roam/roam.key.asc Key fingerprint FDBA FD79 C26F 3C51 C95E DF9E ED18 B68D 1619 4553 Hey, out there - is it *you* reading me, or is it someone else? Index: src/crypto/telnet/libtelnet/auth.c =================================================================== RCS file: /home/ncvs/src/crypto/telnet/libtelnet/auth.c,v retrieving revision 1.3.2.5 diff -u -r1.3.2.5 auth.c --- src/crypto/telnet/libtelnet/auth.c 13 Apr 2002 10:59:07 -0000 1.3.2.5 +++ src/crypto/telnet/libtelnet/auth.c 19 Nov 2002 14:35:16 -0000 @@ -359,7 +359,7 @@ } *e++ = IAC; *e++ = SE; - net_write(str_request, e - str_request); + telnet_net_write(str_request, e - str_request); printsub('>', &str_request[2], e - str_request - 2); } } @@ -444,7 +444,7 @@ } auth_send_data += 2; } - net_write(str_none, sizeof(str_none)); + telnet_net_write(str_none, sizeof(str_none)); printsub('>', &str_none[2], sizeof(str_none) - 2); if (auth_debug_mode) printf(">>>%s: Sent failure message\r\n", Name); @@ -537,7 +537,7 @@ } *e++ = IAC; *e++ = SE; - net_write(str_request, e - str_request); + telnet_net_write(str_request, e - str_request); printsub('>', &str_request[2], e - &str_request[2]); return(1); } Index: src/crypto/telnet/libtelnet/enc_des.c =================================================================== RCS file: /home/ncvs/src/crypto/telnet/libtelnet/enc_des.c,v retrieving revision 1.3.2.1 diff -u -r1.3.2.1 enc_des.c --- src/crypto/telnet/libtelnet/enc_des.c 13 Apr 2002 10:59:07 -0000 1.3.2.1 +++ src/crypto/telnet/libtelnet/enc_des.c 19 Nov 2002 14:35:22 -0000 @@ -225,7 +225,7 @@ *p++ = IAC; *p++ = SE; printsub('>', &fbp->fb_feed[2], p - &fbp->fb_feed[2]); - net_write(fbp->fb_feed, p - fbp->fb_feed); + telnet_net_write(fbp->fb_feed, p - fbp->fb_feed); break; default: return(FAILED); @@ -284,7 +284,7 @@ *p++ = IAC; *p++ = SE; printsub('>', &fbp->fb_feed[2], p - &fbp->fb_feed[2]); - net_write(fbp->fb_feed, p - fbp->fb_feed); + telnet_net_write(fbp->fb_feed, p - fbp->fb_feed); state = fbp->state[DIR_DECRYPT-1] = IN_PROGRESS; break; @@ -309,7 +309,7 @@ *p++ = IAC; *p++ = SE; printsub('>', &fbp->fb_feed[2], p - &fbp->fb_feed[2]); - net_write(fbp->fb_feed, p - fbp->fb_feed); + telnet_net_write(fbp->fb_feed, p - fbp->fb_feed); break; } Index: src/crypto/telnet/libtelnet/encrypt.c =================================================================== RCS file: /home/ncvs/src/crypto/telnet/libtelnet/encrypt.c,v retrieving revision 1.3.2.2 diff -u -r1.3.2.2 encrypt.c --- src/crypto/telnet/libtelnet/encrypt.c 13 Apr 2002 10:59:07 -0000 1.3.2.2 +++ src/crypto/telnet/libtelnet/encrypt.c 19 Nov 2002 14:35:29 -0000 @@ -427,7 +427,7 @@ */ if (!Server && autodecrypt) encrypt_send_request_start(); - net_write(str_send, str_suplen); + telnet_net_write(str_send, str_suplen); printsub('>', &str_send[2], str_suplen - 2); str_suplen = 0; } @@ -773,7 +773,7 @@ } *strp++ = IAC; *strp++ = SE; - net_write(str_keyid, strp - str_keyid); + telnet_net_write(str_keyid, strp - str_keyid); printsub('>', &str_keyid[2], strp - str_keyid - 2); } @@ -832,7 +832,7 @@ } *p++ = IAC; *p++ = SE; - net_write(str_start, p - str_start); + telnet_net_write(str_start, p - str_start); net_encrypt(); printsub('>', &str_start[2], p - &str_start[2]); /* @@ -858,7 +858,7 @@ return; str_end[3] = ENCRYPT_END; - net_write(str_end, sizeof(str_end)); + telnet_net_write(str_end, sizeof(str_end)); net_encrypt(); printsub('>', &str_end[2], sizeof(str_end) - 2); /* @@ -886,7 +886,7 @@ } *p++ = IAC; *p++ = SE; - net_write(str_start, p - str_start); + telnet_net_write(str_start, p - str_start); printsub('>', &str_start[2], p - &str_start[2]); if (encrypt_debug_mode) printf(">>>%s: Request input to be encrypted\r\n", Name); @@ -896,7 +896,7 @@ encrypt_send_request_end(void) { str_end[3] = ENCRYPT_REQEND; - net_write(str_end, sizeof(str_end)); + telnet_net_write(str_end, sizeof(str_end)); printsub('>', &str_end[2], sizeof(str_end) - 2); if (encrypt_debug_mode) Index: src/crypto/telnet/libtelnet/kerberos.c =================================================================== RCS file: /home/ncvs/src/crypto/telnet/libtelnet/kerberos.c,v retrieving revision 1.3.2.1 diff -u -r1.3.2.1 kerberos.c --- src/crypto/telnet/libtelnet/kerberos.c 13 Apr 2002 10:59:07 -0000 1.3.2.1 +++ src/crypto/telnet/libtelnet/kerberos.c 19 Nov 2002 14:35:33 -0000 @@ -126,7 +126,7 @@ *p++ = SE; if (str_data[3] == TELQUAL_IS) printsub('>', &str_data[2], p - (&str_data[2])); - return(net_write(str_data, p - str_data)); + return(telnet_net_write(str_data, p - str_data)); } int Index: src/crypto/telnet/libtelnet/kerberos5.c =================================================================== RCS file: /home/ncvs/src/crypto/telnet/libtelnet/kerberos5.c,v retrieving revision 1.1.1.1.8.1 diff -u -r1.1.1.1.8.1 kerberos5.c --- src/crypto/telnet/libtelnet/kerberos5.c 13 Apr 2002 10:59:07 -0000 1.1.1.1.8.1 +++ src/crypto/telnet/libtelnet/kerberos5.c 19 Nov 2002 14:35:38 -0000 @@ -128,7 +128,7 @@ *p++ = SE; if (str_data[3] == TELQUAL_IS) printsub('>', &str_data[2], p - &str_data[2]); - return(net_write(str_data, p - str_data)); + return(telnet_net_write(str_data, p - str_data)); } int Index: src/crypto/telnet/libtelnet/krb4encpwd.c =================================================================== RCS file: /home/ncvs/src/crypto/telnet/libtelnet/krb4encpwd.c,v retrieving revision 1.3.2.1 diff -u -r1.3.2.1 krb4encpwd.c --- src/crypto/telnet/libtelnet/krb4encpwd.c 13 Apr 2002 10:59:07 -0000 1.3.2.1 +++ src/crypto/telnet/libtelnet/krb4encpwd.c 19 Nov 2002 14:35:42 -0000 @@ -146,7 +146,7 @@ *p++ = SE; if (str_data[3] == TELQUAL_IS) printsub('>', &str_data[2], p - (&str_data[2])); - return(net_write(str_data, p - str_data)); + return(telnet_net_write(str_data, p - str_data)); } int Index: src/crypto/telnet/libtelnet/misc-proto.h =================================================================== RCS file: /home/ncvs/src/crypto/telnet/libtelnet/misc-proto.h,v retrieving revision 1.1.1.1.8.1 diff -u -r1.1.1.1.8.1 misc-proto.h --- src/crypto/telnet/libtelnet/misc-proto.h 13 Apr 2002 10:59:07 -0000 1.1.1.1.8.1 +++ src/crypto/telnet/libtelnet/misc-proto.h 19 Nov 2002 14:35:46 -0000 @@ -71,7 +71,7 @@ /* * These functions are imported from the application */ -int net_write(unsigned char *, int); +int telnet_net_write(unsigned char *, int); void net_encrypt(void); int telnet_spin(void); char *telnet_getenv(char *); Index: src/crypto/telnet/libtelnet/rsaencpwd.c =================================================================== RCS file: /home/ncvs/src/crypto/telnet/libtelnet/rsaencpwd.c,v retrieving revision 1.1.1.1.8.1 diff -u -r1.1.1.1.8.1 rsaencpwd.c --- src/crypto/telnet/libtelnet/rsaencpwd.c 13 Apr 2002 10:59:07 -0000 1.1.1.1.8.1 +++ src/crypto/telnet/libtelnet/rsaencpwd.c 19 Nov 2002 14:35:51 -0000 @@ -142,7 +142,7 @@ *p++ = SE; if (str_data[3] == TELQUAL_IS) printsub('>', &str_data[2], p - (&str_data[2])); - return(net_write(str_data, p - str_data)); + return(telnet_net_write(str_data, p - str_data)); } int Index: src/crypto/telnet/libtelnet/sra.c =================================================================== RCS file: /home/ncvs/src/crypto/telnet/libtelnet/sra.c,v retrieving revision 1.1.2.7 diff -u -r1.1.2.7 sra.c --- src/crypto/telnet/libtelnet/sra.c 16 May 2002 08:46:49 -0000 1.1.2.7 +++ src/crypto/telnet/libtelnet/sra.c 19 Nov 2002 14:35:56 -0000 @@ -106,7 +106,7 @@ *p++ = SE; if (str_data[3] == TELQUAL_IS) printsub('>', &str_data[2], p - (&str_data[2])); - return(net_write(str_data, p - str_data)); + return(telnet_net_write(str_data, p - str_data)); } int Index: src/crypto/telnet/telnet/authenc.c =================================================================== RCS file: /home/ncvs/src/crypto/telnet/telnet/authenc.c,v retrieving revision 1.2.8.2 diff -u -r1.2.8.2 authenc.c --- src/crypto/telnet/telnet/authenc.c 13 Apr 2002 10:59:08 -0000 1.2.8.2 +++ src/crypto/telnet/telnet/authenc.c 19 Nov 2002 14:36:02 -0000 @@ -55,7 +55,7 @@ #include "types.h" int -net_write(unsigned char *str, int len) +telnet_net_write(unsigned char *str, int len) { if (NETROOM() > len) { ring_supply_data(&netoring, str, len); Index: src/crypto/telnet/telnetd/authenc.c =================================================================== RCS file: /home/ncvs/src/crypto/telnet/telnetd/authenc.c,v retrieving revision 1.4.2.2 diff -u -r1.4.2.2 authenc.c --- src/crypto/telnet/telnetd/authenc.c 13 Apr 2002 10:59:08 -0000 1.4.2.2 +++ src/crypto/telnet/telnetd/authenc.c 19 Nov 2002 14:36:05 -0000 @@ -47,7 +47,7 @@ #include int -net_write(unsigned char *str, int len) +telnet_net_write(unsigned char *str, int len) { if (nfrontp + len < netobuf + BUFSIZ) { output_datalen(str, len); To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message