Date: Fri, 14 Mar 2014 10:38:43 +0100 From: Crest <crest@rlwinm.de> To: freebsd-security@freebsd.org Subject: Re: [PATCH] casperd should detach from controlling session Message-ID: <5322CE23.6000904@rlwinm.de> In-Reply-To: <53221E54.1030600@delphij.net> References: <53221E54.1030600@delphij.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On 13.03.2014 22:08, Xin Li wrote: > Hi, Pawel, > > I have noticed that casperd's child (zygote) would still use > controlling session from parent. This can be observed by running > ps -ax on systems running casperd, where the child have a spurious > console associated. > > The attached patch would fix it. May I commit it against -HEAD? > > By the way, the zygote child also closes file descriptor 4 twice > (harmless; it's either sp[0] or the /dev/null which is closed > before starting zygote_main, or before returning from stdnull(). > Based on the construct of the code, I believe both close() can be > omitted. If this makes sense I'll submit a new patch. Wouldn't this patch break support for external monitoring e.g. by daemontools. By convention a daemontools run script is started with its own process group and execs into the service. If a service tries to unconditionally create its own process group it will fail.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5322CE23.6000904>