Skip Menu |
 

Download (untitled) / with headers
text/plain 2.2KiB
From fcusack@ratbert.iconnet.net Mon Dec 28 12:44:37 1998
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 MAA22067 for <bugs@RT-11.MIT.EDU>; Mon, 28 Dec 1998 12:44:36 -0500
Received: from ratbert.iconnet.net by MIT.EDU with SMTP
id AA03938; Mon, 28 Dec 98 12:44:25 EST
Received: (from fcusack@localhost)
by ratbert.iconnet.net (8.9.1/8.9.1) id MAA25789;
Mon, 28 Dec 1998 12:45:54 -0500 (EST)
Message-Id: <199812281745.MAA25789@ratbert.iconnet.net>
Date: Mon, 28 Dec 1998 12:45:54 -0500 (EST)
From: fcusack@iconnet.net
Reply-To: fcusack@iconnet.net
To: krb5-bugs@MIT.EDU
Cc: fcusack@iconnet.net
Subject: setjmp() bug in prompter.c
X-Send-Pr-Version: 3.99

Show quoted text
>Number: 679
>Category: krb5-libs
>Synopsis: POSIX says automatic vars are undefined after setjmp()
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: krb5-unassigned
>State: open
>Class: sw-bug
>Submitter-Id: unknown
>Arrival-Date: Mon Dec 28 12:45:01 EST 1998
>Last-Modified:
>Originator: Frank Cusack
>Organization:
Icon CMT Corp.
Show quoted text
>Release: krb5-current-19981119
>Environment:
Unix
System: SunOS ratbert 5.6 Generic_105181-09 sun4u sparc SUNW,Ultra-5_10
Architecture: sun4

Show quoted text
>Description:
OK, I don't know if it's POSIX that says it, but after longjmp(),
automatic vars are undefined. In lib/krb5/os/prompter.c,
krb5_prompter_posix(), ointrfunc *should* be a global, volatile,
or static var to get around this (signal handler gets reset
to ointrfunc when krb5_prompter_posix() returns, possibly
after an interrupt).

The fix below just makes it a global.
Show quoted text
>How-To-Repeat:
>Fix:
Index: prompter.c
===================================================================
RCS file: /icon/d04/cvsroot/3rd-party/krb5-19981119/lib/krb5/os/prompter.c,v
retrieving revision 1.2
diff -u -r1.2 prompter.c
--- prompter.c 1998/11/25 06:50:50 1.2
+++ prompter.c 1998/12/28 17:35:22
@@ -13,6 +13,7 @@
#endif /* ECHO_PASSWORD */

static jmp_buf pwd_jump;
+static krb5_sigtype (*ointrfunc)();

static krb5_sigtype
intr_routine(signo)
@@ -34,7 +35,6 @@

register char *ptr;
int scratchchar;
- krb5_sigtype (*ointrfunc)();
krb5_error_code errcode;
int i;
#ifndef ECHO_PASSWORD
Show quoted text
>Audit-Trail:
>Unformatted:
volatile qualifier was added to ointrfunc a while ago.