[Pkg-xfce-devel] Bug#721744: Bug#721744: Pollutes home with .Xauthority.* files (with bad permissions)

Yves-Alexis Perez corsac at debian.org
Wed Sep 4 20:01:10 UTC 2013

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

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

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: This is a digitally signed message part
URL: <http://lists.alioth.debian.org/pipermail/pkg-xfce-devel/attachments/20130904/2707cf4c/attachment.sig>

More information about the Pkg-xfce-devel mailing list