[872] in Kerberos-V5-bugs

home help back first fref pref prev next nref lref last post

Re: problems dealing with stopped children in ksu

daemon@ATHENA.MIT.EDU (Ari Medvinsky)
Tue Oct 18 14:25:28 1994

Date: Tue, 18 Oct 1994 11:25:13 -0700
From: ari@ISI.EDU (Ari Medvinsky)
To: fred@stsci.edu
Cc: krb5-bugs@MIT.EDU



> 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

This fix is wrong. you deleted the target cache before executing
the new shell, thus defeating part of the purpose of ksu (to set
up a new security context, see the man page):

 }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);
        }


Also if you delete the fork then the target cache will remain after
you exit the new shell.

-Ari 

Ari Gennady Medvinsky		e-mail: ari@isi.edu

home help back first fref pref prev next nref lref last post