[860] in Kerberos-V5-bugs
minor bug in Kerberos V Beta 4 under Solaris 2.x
daemon@ATHENA.MIT.EDU (Fred Romelfanger)
Fri Oct 14 13:15:48 1994
Date: Fri, 14 Oct 1994 13:15:39 -0400
From: fred@stsci.edu (Fred Romelfanger)
To: fred@stsci.edu, krb5-bugs@MIT.EDU, pgrant@stsci.edu
I ran into a problem with kadmind going into an infinite loop under
Solaris 2.3 and 2.4 due to signal handling. What happens is the
call to signal causes the SIGCHLD signal to be redeliverd since it is
still pending (ie. wait hadn't been called yet). I reversed the
order of the signal and wait calls and it appears to fix the
immediate problem, but I could see other problems occuring if
more than one child died at the same time since you could still have
more than one sigchld being processed at one time although it shouldn't
get into an infinite loop again.
Kerberos 5 Beta 4 was built using Sun C 3.0 on a Solaris 2.3 and Sun C 3.0.1
on a Solaris 2.4 system. Both have the same problem. The Kerberos 4 libraries
were also built to provide kerberos 4 compatibility since Sun provides and
incomplete installation. The systems involved are both single processor
sparc systems.
Here's a diff:
diff -c5 src/kadmin/server/adm_network.c src/kadmin/server/adm_network.orig
*** src/kadmin/server/adm_network.c Fri Oct 14 12:53:56 1994
--- src/kadmin/server/adm_network.orig Fri Oct 14 12:53:16 1994
***************
*** 91,103 ****
#else
int status;
#endif
int pid, i, j;
- pid = wait(&status);
-
signal(SIGCHLD, do_child);
if (pid < 0)
SIGNAL_RETURN;
for (i = 0; i < pidarraysize; i++)
--- 91,103 ----
#else
int status;
#endif
int pid, i, j;
signal(SIGCHLD, do_child);
+
+ pid = wait(&status);
if (pid < 0)
SIGNAL_RETURN;
for (i = 0; i < pidarraysize; i++)