pulseaudio won't run when home directory is mounted with CIFS
Submitted by Maarten Jacobs
Assigned to pul..@..op.org
Description
I'm fairly sure this is a duplicate of an existing bug as I'm not the first to experience this issue... However I have not been able to find a record of this bug on Bugzilla.
When a user's home directory is crossmounted on a linux machine from another host using CIFS, pulseaudio will not start as pulseaudio cannot set the necessary permissions on the .config/pulse directory (CIFS doesn't allow permissions).
I have put together a quick fix that tests whether the filesystem is a CIFS filesystem, and returns early from the procedure "pa_make_secure_dir" to prevent pulseaudio to fail:
--- core-util.c 2013-11-14 23:05:47.709911713 -0500 +++ core-util.c.orig 2013-11-14 23:10:28.314384314 -0500 @@ -37,7 +37,6 @@ #include <ctype.h> #include <sys/types.h> #include <sys/stat.h> -#include <sys/vfs.h> #include <dirent.h>
#ifdef HAVE_LANGINFO_H @@ -224,7 +223,6 @@
- already exist, however. / int pa_make_secure_dir(const char dir, mode_t m, uid_t uid, gid_t gid, bool update_perms) { struct stat st;
- struct statfs stfs; int r, saved_errno; bool retry = true;
@@ -283,14 +281,6 @@ if (!update_perms) return 0;
- if (fstatfs(fd, &stfs) < 0) {
-
pa_assert_se(pa_close(fd) >= 0);
-
goto fail;
- }
- if (stfs.f_type == 0xFF534D42)
-
return 0;
#ifdef HAVE_FCHOWN if (uid == (uid_t) -1) uid = getuid();
I have tested this on my installation (Linux Mint 14 32-bit) and it appears to work. I don't know how to submit the fix properly so I'm hoping somebody will see this and help guide me on this.