From jdaniel@MIT.EDU Mon Mar 1 00:33:21 1999 Received: from MIT.EDU (SOUTH-STATION-ANNEX.MIT.EDU [18.72.1.2]) by rt-11.MIT.EDU (8.7.5/8.7.3) with SMTP id AAA13415 for ; Mon, 1 Mar 1999 00:33:21 -0500 Received: from SNORKLEWACKER.MIT.EDU by MIT.EDU with SMTP id AA23200; Mon, 1 Mar 99 00:32:59 EST Received: by snorklewacker.mit.edu (8.8.7/4.7) id AAA28035; Mon, 1 Mar 1999 00:33:16 -0500 Message-Id: <199903010533.AAA28035@snorklewacker.mit.edu> Date: Mon, 1 Mar 1999 00:33:16 -0500 From: Jeremy Daniel To: bugs@MIT.EDU, krb5-bugs@MIT.EDU Cc: sipb-athena-bugs@MIT.EDU Subject: ksu segfaults >Number: 698 >Category: krb5-clients >Synopsis: ksu segfaults >Confidential: yes >Severity: serious >Priority: medium >Responsible: tlyu >State: closed >Class: sw-bug >Submitter-Id: unknown >Arrival-Date: Mon Mar 01 00:34:01 EST 1999 >Last-Modified: Mon Mar 08 23:02:01 EST 1999 >Originator: >Organization: >Release: >Environment: >Description: bug: When run as a user ksu fails with "Segmentation fault" when ~root/.k5users exists, regardless of whether it is valid or empty or whatever. where tested: crack.mit.edu: netbsd-athena 8.2.3 /usr/athena/bin/ksu /mit/krb5/build/build/clients/ksu/ksu mkc.mit.edu: SunOS-athena 8.2.17 /usr/athena/bin/ksu references: ksu manpage >How-To-Repeat: >Fix: >Audit-Trail: Responsible-Changed-From-To: gnats-admin->tlyu Responsible-Changed-By: tlyu Responsible-Changed-When: Wed Mar 3 19:47:06 1999 Responsible-Changed-Why: refiled State-Changed-From-To: open-analyzed State-Changed-By: tlyu State-Changed-When: Wed Mar 3 19:47:20 1999 State-Changed-Why: this one is really painful. State-Changed-From-To: analyzed-closed State-Changed-By: tlyu State-Changed-When: Mon Mar 8 23:01:33 1999 State-Changed-Why: patched, tested, and queued for 1.0.6 From: Tom Yu To: jdaniel@MIT.EDU Cc: bugs@MIT.EDU, krb5-bugs@MIT.EDU, sipb-athena-bugs@MIT.EDU Subject: Re: krb5-clients/698: ksu segfaults Date: Mon, 8 Mar 1999 23:01:26 -0500 (EST) The following should fix the bug. I've queued the patch for the 1.0.6 release. ---Tom Index: heuristic.c =================================================================== RCS file: /cvs/krbdev/krb5/src/clients/ksu/heuristic.c,v retrieving revision 1.9 retrieving revision 1.9.8.1 diff -u -r1.9 -r1.9.8.1 --- heuristic.c 1996/05/19 18:52:48 1.9 +++ heuristic.c 1999/03/04 23:49:37 1.9.8.1 @@ -253,17 +253,19 @@ } } - if(retval = list_union(k5login_list, k5users_filt_list, &combined_list)){ - close_time(k5users_flag,users_fp, k5login_flag,login_fp); - return retval; - } - close_time(k5users_flag,users_fp, k5login_flag, login_fp); if (cmd) { + if (retval = list_union(k5login_list, + k5users_filt_list, &combined_list)){ + close_time(k5users_flag,users_fp, k5login_flag,login_fp); + return retval; + } *princ_list = combined_list; return 0; } else { + if (k5users_filt_list != NULL) + free(k5users_filt_list); *princ_list = k5login_list; return 0; } >Unformatted: