Hi Russell,

On Thu, 2007-03-29 at 09:34:55 +1100, Russell Coker wrote:
> On Thursday 29 March 2007 07:56, Nicolas François 
> <[EMAIL PROTECTED]> wrote:
> > It is not possible to have a correct PAM sessions support in
> > start-stop-daemon.
> >
> > When start-stop-daemon starts a daemon, it cannot closes the PAM session,
> > or the session will be closed before the daemon quits.
> 
> What is the problem with an inability to close a session?

If you start a PAM session the modules will expect that you'll be
closing it properly (maybe not all of them, but that's something we don't
know from s-s-d). As supposedly s-s-d is dealing with proper daemons,
those will fork (at least) twice to daemonize and s-s-d will not be able
to wait for the daemon and will close the session immediately.

This could be documented that the session handling is broken in s-s-d,
but then your request was to support PAM sessions, and I don't see why
we'd put a broken implementation in s-s-d. I think it's way better to
patch any daemon which would need that, and the code should not be
longer than 100 lines, in the same way the daemons should be patched to
daemonize themselves or to create a pid file.

> Also what is the problem with closing the session early?  If closing
> it before the daemon exits causes a problem then EXACTLY the same
> problem will occur with a nohup job or a screen session. Given that
> screen has been traditional Unix functionality more than 10 years and
> nohup has been around for a lot longer than that I think that anything
> which breaks both of them is unacceptable.

The difference being that we are not dealing with interactive
processes, we are dealing with daemons, also those are PAM sessions
not unix sessions. Also nohup is not linked at all to PAM, and screen
is using PAM but not doing any PAM sessions stuff, so those example
are not really relevant, I'd say.

regards,
guillem



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to