Skip Menu |
 

Download (untitled) / with headers
text/plain 2.5KiB
From dsr@lnscu5.lns.cornell.edu Fri Feb 22 14:25:29 2002
Received: from pacific-carrier-annex.mit.edu (PACIFIC-CARRIER-ANNEX.MIT.EDU [18.7.21.83])
by rt-11.mit.edu (8.9.3/8.9.3) with ESMTP id OAA20733
for <bugs@RT-11.mit.edu>; Fri, 22 Feb 2002 14:25:29 -0500 (EST)
Received: from lnscu5.lns.cornell.edu (lnscu5.lns.cornell.edu [128.84.44.111])
by pacific-carrier-annex.mit.edu (8.9.2/8.9.2) with ESMTP id OAA06029
for <krb5-bugs@mit.edu>; Fri, 22 Feb 2002 14:25:28 -0500 (EST)
Received: from lnscu6.lns.cornell.edu (lnscu6.lns.cornell.edu [128.84.45.151])
by lnscu5.lns.cornell.edu (8.12.1/8.12.1) with ESMTP id g1MJPSo2011969
for <krb5-bugs@mit.edu>; Fri, 22 Feb 2002 14:25:28 -0500 (EST)
Received: by lnscu6.lns.cornell.edu (8.8.8/1.1.22.3/15Feb00-0854AM)
id OAA0000019631; Fri, 22 Feb 2002 14:25:28 -0500 (EST)
Message-Id: <200202221925.OAA0000019631@lnscu6.lns.cornell.edu>
Date: Fri, 22 Feb 2002 14:25:28 -0500 (EST)
From: Dan Riley <dsr@mail.lns.cornell.edu>
Reply-To: dsr@mail.lns.cornell.edu
To: krb5-bugs@mit.edu
Subject: get_authorized_princ_names closes unitialized FILE pointers
X-Send-Pr-Version: 3.99

Show quoted text
>Number: 1062
>Category: krb5-clients
>Synopsis: ksu get_authorized_princ_names closes unitialized file handles
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: krb5-unassigned
>State: open
>Class: sw-bug
>Submitter-Id: unknown
>Arrival-Date: Fri Feb 22 14:26:00 EST 2002
>Last-Modified:
>Originator: Dan Riley
>Organization:
LNS, Cornell U.
Show quoted text
>Release: krb5-1.2.3
>Environment:
System: OSF1 lnscu6.lns.cornell.edu V4.0 1229 alpha
Machine: alpha
Show quoted text
>Description:
ksu get_authorized_princ_names/close_time in heuristic.c can, under
some error conditions, try to close file handles that were not
initialized or opened.
Show quoted text
>How-To-Repeat:
>Fix:

diff -ur krb5-1.2.3/src/clients/ksu/heuristic.c krb5/clients/ksu/heuristic.c
--- krb5-1.2.3/src/clients/ksu/heuristic.c Wed Jan 9 17:27:02 2002
+++ krb5/clients/ksu/heuristic.c Fri Nov 30 13:28:03 2001
@@ -199,7 +199,7 @@
struct passwd *pwd;
int k5login_flag =0;
int k5users_flag =0;
- FILE * login_fp, * users_fp;
+ FILE * login_fp = 0, * users_fp = 0;
char ** k5login_list = NULL, ** k5users_list = NULL;
char ** k5users_filt_list = NULL;
char ** combined_list = NULL;
@@ -278,8 +278,8 @@
FILE *login_fp;
{

- if (!k5users_flag) fclose(users_fp);
- if (!k5login_flag) fclose(login_fp);
+ if (!k5users_flag && users_fp) fclose(users_fp);
+ if (!k5login_flag && login_fp) fclose(login_fp);

}

Show quoted text
>Audit-Trail:
>Unformatted: