Code to replace the unexpected.tdb file

idra at samba.org idra at samba.org
Wed Jan 5 15:56:37 MST 2011


On Wed, Jan 05, 2011 at 12:35:47PM +0100, Volker Lendecke wrote:
> On Wed, Jan 05, 2011 at 10:17:28PM +1100, Andrew Bartlett wrote:
> > > It replaces it
> > > with a unix domain socket /tmp/.nmbd/unexpected where nmbd
> > > delivers specific packets requested by for example nmblookup
> > > and winbind.
> > 
> > Is there a particular reason the pipe needs to be in /tmp/.nmbd?  The
> > clients that intend to use this will be samba processes, that have
> > already read the smb.conf, so can't this be in lockdir or similar?
> 
> I modeled that after the winbind pipe. And maybe if that
> info is accessible easily, wine might be interested, too.
> 
> I've considered to add more functionality in the future,
> like for example also sending packets via that pipe and not
> via the messaging_send mechanism.
> 
> Another pipe might be something like /tmp/.nmbd/nameregister
> which might allow a client (wine?) to send a netbios name to
> register and send/receive datagrams for this name. For the
> session service we would have to hook into smbd also, but
> the tevent_req infrastructure we have now should make this
> pretty easy in nmbd these days.
> 
> Not sure if anything of this is relevant these days though,
> but it's a nice little excercise :-)

Thanks Volker,
this code looks really interesting, although I have to say that /tmp is really
not a good place for something like these pipes.

In Fedora/RHEL we moved the winbindd pipes to /var since a long time already, and
at least Fedora is trying to get into a state where /tmp can be mounted into name
spaces that are private to each user.

So in the long term using /tmp to share data between processes run by different
users is not a good idea.

/var/lib/samba or similar is a better choice for this kind of thing.

Simo.

-- 
Simo Sorce       idra at samba.org
-------------------------------
Samba Team http://www.samba.org


More information about the samba-technical mailing list