On mer., 2013-09-04 at 21:54 +0200, Yuri D'Elia wrote: > On 09/04/2013 09:46 PM, Yuri D'Elia wrote: > > On 09/04/2013 09:35 PM, Yves-Alexis Perez wrote: > >> I don't have .Xauthority files polluting my homedir so I'm not sure what > >> happens to you, but the 0644 perms indeed don't look too good. > > > > A quick test revealed that those .Xauthority.* files are created when > > the machine is shutdown (via halt, or acpi power button event) and then > > brought up again. > > I should add that I'm using systemd, which might affect how the X > session is brought down. > Yes, it might be related since, I'm using sysvrc. Note that file is written using g_file_set_contents(), and the doc says (https://developer.gnome.org/glib/2.37/glib-File-Utilities.html#g-file-set-contents):
---- Note that the name for the temporary file is constructed by appending up to 7 characters to filename. ---- So it might just be the temporary file which is leftover somehow, since return code for g_file_set_contents() is not checked (http://sources.debian.net/src/lightdm/1.6.0-3/src/xauthority.c#L332) I've followed up on a bug I opened few years ago with the same kind of issue, but which is /still/ private currently, will report back when I have news. Basically proper fix would be to: - set the umask correctly before using g_file_set_contents() - check the error code and do something sane in case it fails Regards, -- Yves-Alexis
signature.asc
Description: This is a digitally signed message part