Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 571464 - net-fs/samba should create /var/lock/samba in tmpfiles.d to prevent other applications (such as gnome-base/gvfs) from failing
Summary: net-fs/samba should create /var/lock/samba in tmpfiles.d to prevent other app...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's SAMBA Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-01-10 11:26 UTC by Mike Auty (RETIRED)
Modified: 2016-01-13 16:46 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Auty (RETIRED) gentoo-dev 2016-01-10 11:26:51 UTC
When attempting to mount a samba share through gvfs it fails.  The error messages were not helpful:

$ gvfs-mount smb://<server>/<path>/
Error mounting location: Message recipient disconnected from message bus without replying

$ dmesg
[ 1207.688720] pool[4366]: segfault at 0 ip 00007f85a28ca97a sp 00007f8587ffe868 error 4 in libc-2.22.so[7f85a2839000+193000]

I did however manage to track it down to the none-existence of /var/lock/samba.  It turns out, it doesn't even matter if the user can write to it or not, but if it doesn't exist samba tries to create it, fails and the whole call fails.

We already have a samba.conf that gets installed into /usr/lib/tmpfiles.d/samba.conf that creates /var/run/samba with the following line:

D /var/run/samba 0755 root root

A solution to this problem would be to add the additional line:

D /var/lock/samba 0755 root root

A workaround for users experiencing this problem is to drop a samba-extra.conf file (so as not to override the installed samba.conf) in /etc/tmpfiles.d/ containing the second (/var/lock/samba) line.

Let me know if you need further details...
Comment 1 Víctor Ostorga (RETIRED) gentoo-dev 2016-01-11 17:06:07 UTC
Which version of samba are you talking about?

If not 4.2.7, please test with that version, because right now is the one is getting attention from devs.
Comment 2 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2016-01-13 16:46:27 UTC
commit 31ede1cdd8a7ed2769219f4f64c3c4cabbd15975
Author: Lars Wendler <polynomial-c@gentoo.org>
Date:   Wed Jan 13 17:45:46 2016

    net-fs/samba: Added /var/lock/samba to tmpfiles.d file (bug #571464).

    Package-Manager: portage-2.2.26
    Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>

Added without (rev)bump. Please re-emerge samba if you require it before the next regular bump.