[Swan-dev] Fwd: pluto: server.c: illuminate childhandler_cb; ditch side-effects from passert arg

Andrew Cagney andrew.cagney at gmail.com
Wed Oct 18 14:49:44 UTC 2017


Yea, that code ...

I'm sitting on set of changes:

- stop kernel.c randomly discarding sigchilds (oops)
- stop the strangeness where signal handlers are installed twice; only the
second is needed, the first looks like hangover from pre-event-loop days
- get this code correctly working with multiple children and multiple forks

+ /*
+ * ??? Super tricky:
+ * If addconn_child_pid == 0 (i.e. there is no addcon child)
+ * wait for any child process whose process group ID is equal to that of
the calling process.
+ * Otherwise: wait specifically for the addconn_child_pid.
+ */

I don't think that was the intent (I suspect you're giving the code too
much credit :-).

The signal handler is currently set up to fire only once and the code seems
to expect it to be from addconn.

Now the scary bit - the reason for the fork() is so that PAM can run in a
separate process.

While my code passes the test suite, that isn't saying much.   After the
fork(),  I know I need to restore the signal table; I'm wondering what else.
(technically this is the simplistic fork() implementation, I believe SSH
always two processes chatting to each other, and then has one of them
forking when pam is needed)

Andrew

---------- Forwarded message ----------
From: D. Hugh Redelmeier <hugh at vault.libreswan.fi>
Date: 18 October 2017 at 03:13
Subject: [Swan-commit] Changes to ref refs/heads/master
To: swan-commit at lists.libreswan.org


New commits:
commit b59e3acd24b5617ee7aa623f46f65f35addb0dab
Author: D. Hugh Redelmeier <hugh at mimosa.com>
Date:   Wed Oct 18 03:11:15 2017 -0400

    pluto: server.c: illuminate childhandler_cb; ditch side-effects from
passert arg

_______________________________________________
Swan-commit mailing list
Swan-commit at lists.libreswan.org
https://lists.libreswan.org/mailman/listinfo/swan-commit
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.libreswan.org/pipermail/swan-dev/attachments/20171018/3567532f/attachment.html>


More information about the Swan-dev mailing list