smbcontrol ping command

Jeremy Allison jra at samba.org
Mon Aug 4 16:05:27 GMT 2008


On Fri, Aug 01, 2008 at 07:52:21PM -0700, James Peach wrote:
> 2008/8/1 Jeremy Allison <jra at samba.org>:
> > On Thu, Jul 31, 2008 at 04:43:42PM -0700, Jeremy Allison wrote:
> >> On Wed, Jul 30, 2008 at 05:46:15PM -0700, Herb Lewis wrote:
> >> > with Samba-3.2.0 if you run
> >> >
> >> >     smbcontrol smbd ping
> >> >
> >> > you get responses from not only smbd but winbindd and nmbd as well.
> >> > Not sure when this broke.
> >> >
> >> > If you use winbindd or nmbd instead of smbd you only get a pong
> >> > from the appropriate daemon.
> >> >
> >> > I won't have time until Friday to look at this so if someone else
> >> > has nothing to do ... :-)
> >>
> >> Ok, tracked it down (not saying I have nothing to do mind :-).
> >>
> >> In parse_dest() we have :
> >>
> >>         /* Zero is a special return value for broadcast smbd */
> >>
> >>         if (strequal(dest, "smbd")) {
> >>                 return interpret_pid(MSG_BROADCAST_PID_STR);
> >>         }
> >>
> >> which means for smbd it broadcasts to all processes, not
> >> just the running smbd one.
> >>
> >> In lib/messages there's a default "ping/pong" protocol
> >> set up so all running processes that have set up their
> >> messaging database will respond.
> >>
> >> This is the same in 3.0.31, so it's been that way for
> >> a while.
> >>
> >> To fix it, change the strequal(dest, "smbd") to be
> >> strequal(dest, "all") instead, but fix the docs also :-).
> >>
> >> Is there anyone using smbd to mean "all processes"
> >> out there ?
> >
> > If no-one comments, I'm going to commit a change
> > to change "smbd" to "all" and update the docs.
> >
> > Last chance to complain :-).
> 
> do you mean that
>    smbcontrol smbd foo will actually send the message to all,

smbcontrol smbd foo currently sends the message to all.

> or smbcontrol smbd foo will go away and folks should use smbcontrol all
> or smbcontrol all will be a new smbcontrol target in addition to smbd

With this change :

smbcontrol smbd foo

will send to the parent smbd.

smbcontrol all foo

will send to all (including winbindd and nmbd).

Jeremy.


More information about the samba-technical mailing list