[851] in NetBSD-Development
Problem with setpag() and logins
daemon@ATHENA.MIT.EDU (Greg Hudson)
Wed Jul 5 21:25:06 1995
Date: Wed, 5 Jul 1995 21:22:02 -0400
From: Greg Hudson <ghudson@MIT.EDU>
To: netbsd-dev@MIT.EDU, netbsd-afs@MIT.EDU
So, a long time ago, Yoav rebuilt xlogin without -DSUPPORTS_AFS
because it broke sipbtest's login (you'd get an xterm without tokens).
I've determined what happens here: xlogin does correctly set the pag
and get tokens, and then it runs xterm. xterm calls setsid(), and
winds up without your pags. To see this, try logging in as sipbtest
and running "unlog", "newpag", "aklog", and "xterm". In your original
xterm, you will have tokens and "groups" will read:
mit 33536 33521 mit sipbtest
(the reason for the repetition of "mit" is unclear to me) while in
your new xterm, you will not have tokens and "groups" will read:
mit sipbtest
I could be wrong about setsid() being responsible for the stripping of
the pag groups; it could be an initgroups() call or some such.
Incidentally, another problem is that when xlogin is built without
-DSUPPORTS_AFS, it doesn't leave room for pag groups. Thus, if
someone like me logs in, it fills /etc/group with 15 groups and I
can't run newpag.
I don't really know what is at fault here:
* Is it xterm's fault because it has no particular business
calling initgroups()?
* Is it AFS's fault because it's implementing PAGs as groups
not listed in the /etc/group file?
At any rate, the only "solution" I'm qualified to implement (apart
from deciding that we never want to get pags in xlogin) is modifying
xterm to not call initgroups().