Many smbd forked processes are not resetting am_parent to NULL
jra at samba.org
Wed Apr 15 10:06:45 MDT 2015
On Wed, Apr 15, 2015 at 11:28:11AM +0200, Ralph Böhme wrote:
> Hi folks,
> exit_server_common() checks the am_parent global and does a few things
> differently depending whether am_parent is NULL or not.
> What are the supposed semantics? If I'm not mislead am_parent should
> be non NULL in the main smbd process and NULL in any forked child, be
> it a forked sesssion smbd process or some other forked subsystem.
> The thing is, only smbd sessions childs reset am_parent to NULL as
> does the scavenger child, other subsystems like the printing subsystem
> seem to miss this step.
> Shouldn't we basically set am_parent to NULL in anything that forks
> from the main smbd?
> I'm currently looking at adding some cleanup code to
> exit_server_common() that is supposed to execute some code only in the
> am_parent != NULL case in the main smbd process. At the moment the
> code gets executed too from the printing subsystem. :)
That's a sad thing :-(.
> Happy to provide a patch that fixes this if I'm right about this.
Please do :-).
More information about the samba-technical