[3503] in Kerberos

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

HUP question...

daemon@ATHENA.MIT.EDU (Roland Schemers)
Thu Jun 30 09:01:32 1994

To: kerberos@MIT.EDU
Date: 29 Jun 1994 22:35:57 GMT
From: schemers@leland.Stanford.EDU (Roland Schemers)

This probably doesn't belong here, but it is related to the
kerberized rlogin/telnetd/login programs. I just finished building
zephyr and noticed that the "zwgc -ttymode" clients weren't dying.
After some testing it looks like a HUP signal is not sent the shell's
process group upon logout. I wrote a simple perl script to verify
this. The perl script does get a HUP signal when using the standard
SunOS telnetd, but not with AFS's rlogind and/or MIT's rlogind.

I started poking around various sources (i.e, keberos 4, 5, OS source)
and got lost in a maze of #ifdefs, setsids, ioctls, and vhangups. For example,
SUN's in.rlogind does a vhangup at the end whereas the MIT stuff
looks like it does one at the beginning. In any case the vhangup stuff
doesn't seem to be working correctly.

After poking around I tried the following approach. Since login.krb
does a fork and waits for the child (the login shell) to finish, I stuck
in the following call in the dofork() function:

    (void) dest_tkt();          /* If this fails, we lose quietly */

    /* THIS IS THE NEW CALL. send hup signal to child's process group */     
    kill(-child,SIGHUP);    

    /* Leave */
    exit(0);

This works, but I'm wondering if there are any serious problems
lurking... Every place I've checked it looks like it should be valid.

thanks, Roland

-- 
Roland J. Schemers III             |    Networking Systems 
Authentication Services Programmer |    414 Sweet Hall  +1 (415) 723-6740 
Distributed Computing Operations   |    Stanford, CA 94305-3090
Stanford University                |    schemers@Slapshot.Stanford.EDU 

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