Subject: Re: login.conf and xdm
To: Patrick Welche <>
From: Patrick Welche <>
List: tech-x11
Date: 12/21/2005 13:59:36
On Wed, Dec 21, 2005 at 11:52:30AM +0000, Patrick Welche wrote:
> On Tue, Dec 20, 2005 at 10:29:54PM +0100, Pavel Cahyna wrote:
> > On Tue, Dec 20, 2005 at 07:01:29PM +0000, Patrick Welche wrote:
> > > Basically, path and environment variables set in login.conf are thrown
> > > away by xdm even if setusercontext is called. Another method might be
> > > to call setusercontext, and then copy the newly set environment into
> > > verify->userEnviron instead of duplicating code from login_cap.c, but
> > > I prefer the idea of update/add rather than delete/add.
> > 
> > Could all the login.conf handling be implemented in a PAM module that all 
> > PAM-using apps could use without modifying all of them?
> Well, the call to setusercontext() is all the app needs. Currently xdm
> already makes that call, but not in NetBSD as HAS_SETUSERCONTEXT is not
> defined / no "#define HasSetUserContext YES" in I believe
> that is already sufficient to take care of setlogin()/initgroups() etc.
> It also takes care of path/setenv within xdm, but when xdm starts the
> session, it resets the environment, binning path/setenv by replacing it
> with userEnviron - that is why the setuserpath()/setuserenv() is in there.
> So, in otherwords this is just "fixing" what is already there, rather than
> starting something new e.g., let's invent a new module..

Hmm.. This might change things:

revision 1.23
date: 2005/12/20 21:32:20;  author: christos;  state: Exp;  lines: +17 -11
make setuserenv and setuserpath take an environment setting function and
an environment pointer and expose them.
bump version.