Hey all,

I've found a bug in Debian Jessie that is rather complex and I'm not
sure against what package it should be filed. Affected packages are
thunar, libglib2 and systemd.

I have some password protected shares in my /etc/fstab that are mounted
by unprivileged users, e. g.

> //192.168.1.2/Data /media/Data cifs 
> vers=3.0,users,username=user,noauto,file_mode=0640,dir_mode=0750 0 0

When mounting the share with the 'mount' command a password is prompted
as intended. However, mounting the share with thunar fails:
Thunar shows unmounted but available volumes in its left sidebar. On the
first access thunar tries to mount the share and a graphical password
prompt *should* appear. Instead an error message is shown:

> Failed to create password file: Permission denied

After some investigation I found out that the ask-password functionality
from systemd is used. Therefore a file has to be created in
/run/systemd/ask-password and password agents watching the directory
might prompt for the password. See [1] for reference.

Creating the password file fails, as /run/systemd/ask-password is only
writeable by root. As this functionality is intended to be used for
system-level passwords only, I guess it shouldn't be world writeable.

To mount the volume, thunar seems to rely on libglib2 (Thunar calls
g_volume_mount). See [2], [3] for the source code. I don't really
understand how that code works and why systemd ask-password is used - I
didn't manage to find the corresponding code.

In the end there are two approaches to resolving this bug:
  1) systemd ask-password is buggy and does not work as supposed
  2) systemd should not be used in this scenario and either thunar or
glib are to blame

Maybe someone with more knowledge of systemd and/or gtk programming
could look into this.

Janis

[1] http://www.freedesktop.org/wiki/Software/systemd/PasswordAgents/
[2]
http://git.xfce.org/xfce/thunar/tree/thunar/thunar-device.c?h=thunar-1.6.3
[3] https://git.gnome.org/browse/glib/tree/gio/gvolume.c?h=glib-2-42


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/550ffea6.50...@hamme.info

Reply via email to