smbcontrol ping command

Jeremy Allison jra at samba.org
Thu Jul 31 23:43:42 GMT 2008


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 ?

Jeremy.


More information about the samba-technical mailing list