[Pkg-samba-maint] Bug#831770: smbclient needs /run/samba tmpfiles dir under systemd

Jan Stattegger-Sievers jan.stattegger-sievers at fu-berlin.de
Thu Aug 25 10:52:55 UTC 2016


On 2016-08-25 07:47, Mathieu Parent wrote:
>> here smbclient dies with a segfault,
> Really segfault? Or errors out and exits?

It dies with a segfault.

>> In the source package the systemd tmpfiles definition is already
>> created in the rules file:
>>   echo "d /run/samba 0755 root root -" >
>>     $(DESTDIR)/usr/lib/tmpfiles.d/samba.conf
>> But it's not installed for the smbclient package, but only for
>> samba-common-bin, which is no dependency for smbclient.
> I can move this tmpfile to samba-common. But this only solves the
> problem under systemd.
> Also, we must ensure that systemd-tmpfiles is run (after samba-common
> install, and of course on boot).
> I see two solutions:
> - Move this snipset to samba-common (with proper Breaks:) and ensure
> systemd-tmpfiles is called on postinst, or
> - Move lockdir to /var/lib/samba (optionally in a subdir)
> Solution 1 will have non-working smbclient on non-systemd systems.
> solution 2 will have lock files not purged on reboot.

I just saw, that in samba-common.postinst there is:

mkdir -p "$TEMPDIR"

The problem is, that /var/run links to /run, which is a tmpfs. So after 
next boot, the directory is gone.

You say it's a lockdir, than /var/lock aka /run/lock comes to my mind.
That is a directory writable for everybody (with o+t restricted deletion 

Btw: Can multiple instances of smbclient safely use the same tdb lock 
file? Is the client in the end actually using the file?


Jan Stattegger-Sievers                Freie Universität Berlin
jan.stattegger-sievers at fu-berlin.de   ZE Datenverarbeitung
                                       Fabeckstraße 32
                                       14195 Berlin

More information about the Pkg-samba-maint mailing list