From owner-freebsd-current Wed Sep 6 09:22:11 1995 Return-Path: current-owner Received: (from majordom@localhost) by freefall.freebsd.org (8.6.11/8.6.6) id JAA03446 for current-outgoing; Wed, 6 Sep 1995 09:22:11 -0700 Received: from irbs.irbs.com (irbs.com [199.182.75.129]) by freefall.freebsd.org (8.6.11/8.6.6) with ESMTP id JAA03400 for ; Wed, 6 Sep 1995 09:22:07 -0700 Received: (from jc@localhost) by irbs.irbs.com (8.6.12/8.6.6) id MAA08467 for freebsd-current@freefall.cdrom.com; Wed, 6 Sep 1995 12:22:04 -0400 From: John Capo Message-Id: <199509061622.MAA08467@irbs.irbs.com> Subject: Kerberos patch (Gnats is broken) To: freebsd-current@freefall.FreeBSD.org (freebsd-current) Date: Wed, 6 Sep 1995 12:22:03 -0400 (EDT) X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Length: 2632 Sender: current-owner@FreeBSD.org Precedence: bulk >Submitter-Id: current-users >Originator: John Capo >Organization: IRBS Engineering >Confidential: no >Synopsis: Kerberos cores if RCMD is first request (patch included) >Severity: critical >Priority: high >Category: bin >Release: FreeBSD 2.2-CURRENT i386 >Class: sw-bug >Environment: >Description: Several static externals are only initialized on ticket requests. These uninitialized variables are passed to cr_err_reply() from kerb_err_reply(). >How-To-Repeat: Start kerberos and rcp to a non-realm system when an old ticket exists that was not granted by this instance of kerberos. I know, in a perfect world there are no old tickets, but... >Fix: None of this should be static but since the great eBones re-org is underway I left them alone. I did delete unused statics. *** eBones/kerberos/kerberos.c.orig Wed Sep 6 11:16:36 1995 --- eBones/kerberos/kerberos.c Wed Sep 6 12:07:57 1995 *************** *** 67,73 **** static char *req_name_ptr; static char *req_inst_ptr; static char *req_realm_ptr; - static u_char req_no_req; static u_long req_time_ws; int req_act_vno = KRB_PROT_VERSION; /* Temporary for version skew */ --- 67,72 ---- *************** *** 83,90 **** static long n_auth_req; static long n_appl_req; static long n_packets; - static long n_user; - static long n_server; static long max_age = -1; static long pause_int = -1; --- 82,87 ---- *************** *** 355,360 **** --- 352,368 ---- req_act_vno = req_version; + /* set up and correct for byte order and alignment */ + req_name_ptr = (char *) pkt_a_name(pkt); + req_inst_ptr = (char *) pkt_a_inst(pkt); + req_realm_ptr = (char *) pkt_a_realm(pkt); + + bcopy(pkt_time_ws(pkt), &req_time_ws, sizeof(req_time_ws)); + /* time has to be diddled */ + if (swap_bytes) { + swap_u_long(req_time_ws); + } + /* check packet version */ if (req_version != KRB_PROT_VERSION) { lt = klog(L_KRB_PERR, *************** *** 387,402 **** tk->length = 0; k_flags = 0; /* various kerberos flags */ - - /* set up and correct for byte order and alignment */ - req_name_ptr = (char *) pkt_a_name(pkt); - req_inst_ptr = (char *) pkt_a_inst(pkt); - req_realm_ptr = (char *) pkt_a_realm(pkt); - bcopy(pkt_time_ws(pkt), &req_time_ws, sizeof(req_time_ws)); - /* time has to be diddled */ - if (swap_bytes) { - swap_u_long(req_time_ws); - } ptr = (char *) pkt_time_ws(pkt) + 4; req_life = (u_long) (*ptr++); --- 395,400 ---- John Capo IRBS Engineering