Bug#724731: g_get_user_runtime_dir () bug

Simon McVittie smcv at debian.org
Wed Oct 23 11:01:41 UTC 2013


On 23/10/13 08:07, Gabriel Mainberger wrote:
> user at machine:~/Work$ gcc `pkg-config --cflags --libs glib-2.0` -o run run.c
> 
> user at machine:~/Work$ ./run
> /run/user/0

What's your $XDG_RUNTIME_DIR environment variable?

If it's /run/user/0, then GLib is behaving as expected, and the bug is
in some other component (which should either not set this variable,
unset this variable when it switches uid, or set this variable to a more
appropriate value for uid 1000).

Some other relevant info:

* is this in X11 or at a text virtual console?
* if in X11, which display manager (gdm3, lightdm, xdm, kdm, etc.),
  or did you use startx or something from a text virtual console?
* are you using systemd or sysvinit as your init (process 1)?
* which PAM modules do you have (dpkg-query -W 'libpam*'), and have you
  reconfigured the PAM stack or are you using defaults?

One possible workaround would be for GLib to not follow the
XDG_RUNTIME_DIR specification strictly: if XDG_RUNTIME_DIR is set to a
directory we don't own, behave as if it had been unset.

A possible solution would be for display managers (and other components
that switch uid) to unset XDG_RUNTIME_DIR when they switch uid, then
allow environment variables set by the PAM stack to take precedence over
that (so that libpam-systemd can set XDG_RUNTIME_DIR=/run/user/${uid}
when it's working as intended).



More information about the pkg-gnome-maintainers mailing list