smbcontrol ping command

Jeremy Allison jra at samba.org
Fri Aug 1 22:31:51 GMT 2008


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 :-).

Jermey.


More information about the samba-technical mailing list