[871] in Kerberos-V5-bugs
problems dealing with stopped children in ksu
daemon@ATHENA.MIT.EDU (Fred Romelfanger)
Tue Oct 18 13:00:58 1994
Date: Tue, 18 Oct 1994 13:00:48 -0400
From: fred@stsci.edu (Fred Romelfanger)
To: krb5-bugs@MIT.EDU
If I become root using ksu and then suspend the root shell, ksu hangs
because it doesn't know that the child process has stopped and the root
shell is no longer available since the parent process will never tell it
to continue. This should probably be handled as normal su would. As
a work around I changed main.c so that it does not call fork and just
overlays the existing process with the new program. I also moved sweep_up
before execv, to make sure the cleanup got done, but wasn't sure this
still provided the same functionality. Anyway, these are the last several
lines in the funcation main (in main.c) that I am currently using:
if( keep_target_cache || use_source_cache ) {
execv(params[0], params);
com_err(prog_name, errno, "while trying to execv %s",
params[0]);
sweep_up(use_source_cache, cc_target);
exit(1);
}else{
sweep_up(use_source_cache, cc_target);
execv(params[0], params);
com_err(prog_name, errno, "while trying to execv %s",
params[0]);
exit (1);
}
These problems were found on an SS2 running Solaris 2.4 unsing Sun's
3.0.1 compiler products using the beta4 version of kerberos.
Fred Romelfanger
Sr. Systems Engineer
Space Telescope Science Institute
fred@stsci.edu