Subject: bin/10659: Telnetd(8) dumps core without kerberosV configuration?
To: None <gnats-bugs@gnats.netbsd.org>
From: None <taca@sky.yamashina.kyoto.jp>
List: netbsd-bugs
Date: 07/22/2000 22:31:14
>Number:         10659
>Category:       bin
>Synopsis:       Telnetd(8) dumps core without kerberosV configuration?
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Jul 22 22:32:00 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator:     Takahiro Kambe
>Release:        NetBSD 1.5 ALPHA, 2000/7/22
>Organization:
	
>Environment:
	
System: NetBSD land.sky.yamashina.kyoto.jp 1.5_ALPHA NetBSD 1.5_ALPHA (LAND) #81: Sat Jul 22 11:55:04 JST 2000 taca@land.sky.yamashina.kyoto.jp:/usr/src/sys/arch/i386/compile/LAND i386


>Description:
	Telnetd(8) dumps core without kerberosV configuration.
>How-To-Repeat:
	Try to connect using telnet(1) to no kereberos related configuration
	at all.

% telnet land      
Trying 210.235.106.85...
Connected to land.
Escape character is '^]'.
Connection closed by foreign host.

>Fix:
	At kerberos5_init() in lib/libtelnet/kerberso5.c, it seems that
	krb5_init_context()'s return value is ignored.

Index: kerberos5.c
===================================================================
RCS file: /usr/pkg/libdata/cvs/src/lib/libtelnet/kerberos5.c,v
retrieving revision 1.1.1.1
diff -d -u -r1.1.1.1 kerberos5.c
--- kerberos5.c	2000/06/23 16:54:37	1.1.1.1
+++ kerberos5.c	2000/07/23 05:23:45
@@ -131,8 +131,14 @@
 kerberos5_init(Authenticator *ap, int server)
 {
 
-	if (telnet_context == 0)
-		krb5_init_context(&telnet_context);
+	if (telnet_context == 0) {
+		int status;
+
+		status = krb5_init_context(&telnet_context);
+		if (status != 0) {
+			return (1);
+		}
+	}
 
 	if (server) {
 		krb5_error_code ret;

>Release-Note:
>Audit-Trail:
>Unformatted: