Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 20 May 1997 20:17:15 +0200 (CEST)
From:      Joachim Kuebart <joki@kuebart.stuttgart.netsurf.de>
To:        Joachim Kuebart <joki@kuebart.stuttgart.netsurf.de>
Cc:        FreeBSD Hackers <freebsd-hackers@FreeBSD.ORG>
Subject:   RE: xdm and login.conf
Message-ID:  <XFMail.970520203302.joki@jocki.domestic.de>
In-Reply-To: <XFMail.970520022243.joki@jocki.domestic.de>

next in thread | previous in thread | raw e-mail | index | archive | help

On 20-May-97 at 00:20:58 Joachim Kuebart wrote:
>HI!
>
>I am now using FreeBSD 2.2.2-RELEASE (or is it 2.2-STABLE, jkh? :-)
>
>I wonder if anyone has included support for /etc/login.conf in xdm´s login
>widget, xlogin?
>
>If so, would be nice to use the code. If not, I´ll see into it myself ...
>

Hey guys, you´re too slow. I solved the problem (for me) by calling
setusercontext from the global Xsession. All programs of a session are childs
to this process (I hope!). In order to call setusercontext I wrote a small C
program which is available from me.

For those who are interested:
setusercontext.c calls setusercontext() to get the same permissions and limits
and environment variables as the user needs. It then execve()´s a shell
(/bin/sh) with those privileges. This shell is the shell that xdm uses to run
Xsession. When the shell terminates, the session is finished.

In order to do this with the least possible overhead I have set the interpreter
for Xsession to setusercontext, i.e.:

        /usr/X11R6/lib/X11/xdm/Xsession:
        #!/usr/local/bin/setusercontext
        #
        # Rest of Xsession follows

cu Jo

---------------------------------------------------------------------
FreeBSD - top breeders recommend it          <http://www.freebsd.org>;
Joachim Kuebart                                    <joa@delos.lf.net>
Tel: +49 711 653706                        <joa@stuttgart.netsurf.de>
Germany                           <joki@kuebart.stuttgart.netsurf.de>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.970520203302.joki>