[systemd-bugs] [Bug 70810] New: libpam-systemd does not change XDG_RUNTIME_DIR when using su - username

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed Oct 23 22:10:43 CEST 2013


https://bugs.freedesktop.org/show_bug.cgi?id=70810

          Priority: medium
            Bug ID: 70810
          Assignee: systemd-bugs at lists.freedesktop.org
           Summary: libpam-systemd does not change XDG_RUNTIME_DIR when
                    using su - username
        QA Contact: systemd-bugs at lists.freedesktop.org
          Severity: normal
    Classification: Unclassified
                OS: All
          Reporter: gabisoft at freesurf.ch
          Hardware: All
            Status: NEW
           Version: unspecified
         Component: general
           Product: systemd

File: /lib/i386-linux-gnu/security/pam_systemd.so
Version: Version: 204-5
Debian-Package: libpam-systemd

After the specification the user runtime directory must be accessible by the
user.

http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html#variables

But it seams to be an distribution independent behavior, that the
XDG_RUNTIME_DIR variable is not changed in case of su is switching the context.

# echo $XDG_RUNTIME_DIR
/run/user/0
# su - gabriel
$ echo $XDG_RUNTIME_DIR
/run/user/0

(Which should be "/run/user/1000")

This does result in access deny messages, because a normal user does not have
access to the root runtime directory.

GNOME has started using user runtime dir, which is set by the environment
variable XDG_RUNTIME_DIR.

(gnome-settings-daemon:7139): dconf-CRITICAL **: unable to create 
directory '/run/user/0/dconf': Permission denied. doconf will not work 
properly.

This prevent GNOME to start.

Distribution bug reports:

https://bugzilla.redhat.com/show_bug.cgi?id=753882
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=724731

In my opinion this is a bug in pam_systemd.so. Of course

su user

should preserve the XDG_RUNTIME_DIR variable, but

su - user

should not.

In case of login direct as user, the XDG_RUNTIME_DIR is set correct.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-bugs/attachments/20131023/e4b2f78e/attachment.html>


More information about the systemd-bugs mailing list