[PATCHES] Forward smbcontrol messages only from parent

Christof Schmitt cs at samba.org
Wed May 14 11:41:07 MDT 2014


On Wed, May 14, 2014 at 06:25:56PM +0200, Christian Ambach wrote:
> Am 14.05.14 18:10, schrieb Jeremy Allison:
> >Now look at messaging_send_to_children() in the
> >same file. We have:
> >
> >  196 NTSTATUS messaging_send_to_children(struct messaging_context *msg_ctx,
> >  197                                     uint32_t msg_type, DATA_BLOB* data)
> >  198 {
> >  199         NTSTATUS status;
> >  200         struct smbd_parent_context *parent = am_parent;
> >  201         struct smbd_child_pid *child;
> >  202
> >  203         if (parent == NULL) {
> >  204                 return NT_STATUS_INTERNAL_ERROR;
> >  205         }
> >  206
> >  207         for (child = parent->children; child != NULL; child = child->next) {
> >  208                 status = messaging_send(parent->msg_ctx,
> >  209                                         pid_to_procid(child->pid),
> >  210                                         msg_type, data);
> >  ......
> >
> >The local variable 'parent' gets set to 'am_parent',
> >so messaging_send_to_children() should always
> >return NT_STATUS_INTERNAL_ERROR is called within
> >a child.
> This logic was introduced with 78582da8b57120 (the first release
> containing that patch was 4.0).
> 
> I think those patches were used against 3.6, but are not necessary
> any more against any 4.x release.

Yes, with the change in 4.0, those patches are no longer required. Sorry
for the noise.

Christof


More information about the samba-technical mailing list