After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 693679 - broken /var/run/gdm permissions
broken /var/run/gdm permissions
Status: VERIFIED FIXED
Product: gdm
Classification: Core
Component: general
3.6.x
Other Linux
: Normal minor
: ---
Assigned To: GDM maintainers
GDM maintainers
Depends on:
Blocks:
 
 
Reported: 2013-02-12 21:23 UTC by Michael Shigorin
Modified: 2013-02-20 17:13 UTC
See Also:
GNOME target: ---
GNOME version: 3.5/3.6


Attachments
daemon: use 0711 mode for directories (3.19 KB, patch)
2013-02-20 15:19 UTC, Ray Strode [halfline]
none Details | Review

Description Michael Shigorin 2013-02-12 21:23:57 UTC
Just in case, 0770 root:gdm on /var/run/gdm/ is a bit lacking for pam_xauth performing with a logged-in user's privileges (which is the case in e.g. ALT Linux) when xauth cookies are stored under that directory (since 2.22.0).

The heisenbug I've observed on regular-gnome3.iso and regular-cinnamon.iso resulted in permissions being either 0770 root:root (things like consolehelper break) or 0711 root:root (things work).  The details on that particular bug are written down at https://bugzilla.altlinux.org/show_bug.cgi?id=28549 (in Russian, I can translate if that helps) but looks like there's a race condition somewhere (it's a systemd based livecd so no real surprise).

The relevant code snippet is:

--- 
        /* Set up /var/run/gdm */
        g_mkdir_with_parents (GDM_RAN_ONCE_MARKER_DIR, 0755);
        g_chmod (GDM_RAN_ONCE_MARKER_DIR, S_IRWXU | S_IRWXG);
--- http://git.gnome.org/browse/gdm/tree/daemon/main.c?h=gnome-3-6#n496

I haven't found out yet where 0711 would get set up sometimes but the above part seems to stem from 2.29.0 judging by NEWS; didn't spot a relevant bugreport here so far.

What's wrong with 0711 in this particular context?
Comment 1 Ray Strode [halfline] 2013-02-20 15:17:40 UTC
No reason i can think of. let's just use 0711
Comment 2 Ray Strode [halfline] 2013-02-20 15:19:18 UTC
Created attachment 236941 [details] [review]
daemon: use 0711 mode for directories

/var/run/gdm was ending up 0770 in some cases, which
is causing problems.

This commit changes everything to use 0711 across the
board.
Comment 3 Michael Shigorin 2013-02-20 17:13:27 UTC
Thank you!  Should be OK given that this subset works for me:
https://bugzilla.altlinux.org/attachment.cgi?id=5735 (ALT#28549)