[616] in Info-AFS_Redistribution

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

Re: Patches for XDM for AFS authentication

daemon@ATHENA.MIT.EDU (Todd Inglett)
Fri Feb 14 13:57:17 1992

Reply-To: "Todd Inglett" <tinglett@rchland.vnet.ibm.com>
Date: Fri, 14 Feb 1992 10:55:58 -0600 (CST)
From: Todd Inglett <tinglett+@rchland.ibm.com>
To: info-afs@transarc.com
In-Reply-To: <9202112215.AA02583@rpi.edu>

Ok, I have some more observations on this problem:

Xdm works as a daemon that forks for each display that it manages.  If a
user logs in correctly, the forked child waits for the user to logout,
then the child dies.  The parent then forks again to manage the display.
 This child process puts up the login window and calls
ka_UserAuthenticateGeneral when a username/password is entered.  The
parent is normally not running in a PAG.

First, I thought that maybe both the uid and gid of the user must be set
before ka_UserAuthenticateGeneral is called.  So I set the uid/gid and
make the following call:

     ka_UserAuthenticateGeneral(KA_USERAUTH_VERSION|KA_USERAUTH_DOSETPAG,
					    p->pw_name,(char *)0, (char *)0,greet->password,
					    0, 0, 0, &reason)

I set the uid/gid back to 0, do some more ``root'' work, and eventually
set the uid/gid back again and run the user's .xsession.

This doesn't work.  It works fine if I su to root (I still have my
tokens), but does not work when run from /etc/rc.  It poops out after
exactly 16 logins by the same user...which is why it took so long for
people to notice, I guess.

So I tried doing a setpag() in the parent as the first thing that is
done in main().  Now I can login exactly once!  The second time will
hang in ka_UserAuthenticateGeneral.

Does anyone have a clue as to what's going on here?  Do I have to
destroy tokens or something?  I'm on an RS/6000, and it fails for both
AIX 3.1 and 3.2.  We are running AFS 3.1b.

-todd inglett

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