Bug#724731: g_get_user_runtime_dir () bug

Michael Biebl biebl at debian.org
Wed Oct 23 11:30:29 UTC 2013


Am 23.10.2013 13:01, schrieb Simon McVittie:
> 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).


What seems related is the but in gdm3 which fails to start when
libpam-systemd is not installed [1].
libpam-systemd is responsible for creating and setting XDG_RUNTIME_DIR.
So I assume Gabriel didn't have this package installed. Is that correct?

Creating a directory in /run/user requires root-privileges (that's why
it's done in a PAM module), and the fallback thus is in the users home
directory.

Just fyi:
$ echo $XDG_RUNTIME_DIR
/run/user/1000
$ ./run
/run/user/1000
$ unset XDG_RUNTIME_DIR
$ ./run
/home/michael/.cache

So from a cursory look, it seems like glib is behaving correctly and as
Simon suspects, some other component simply sets XDG_RUNTIME_DIR to an
incorrect value.


[1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=724731
-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 901 bytes
Desc: OpenPGP digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-gnome-maintainers/attachments/20131023/91725ee2/attachment.sig>


More information about the pkg-gnome-maintainers mailing list