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

Mathieu Parent math.parent at gmail.com
Thu Aug 25 05:47:40 UTC 2016

On Tue, 19 Jul 2016 12:07:29 +0200 Jan Stattegger-Sievers
<jan.stattegger-sievers at fu-berlin.de> wrote:
> Package: smbclient
> Version: 2:4.2.10+dfsg-0+deb8u3
> Severity: normal
> Hi,


Thanks for your bug report.

> here smbclient dies with a segfault,

Really segfault? Or errors out and exits?

>if /var/run/samba aka /run/samba is
> not present:
>   Unable to create directory /var/run/samba for file gencache_notrans.tdb.
>   Error was Permission denied
> 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.

Also, as smbclient can be run as non-root, we need a more generic solution...



Mathieu Parent

More information about the Pkg-samba-maint mailing list