Comment 6 for bug 685212

Revision history for this message
Yves-Alexis Perez (corsac) wrote :

I'm sorry but that doesn't fix the security bug at all. It doesn't fix the permissions if they are currently bad, and even if the .Xauthority file doesn't exist, fopen() won't do better than set_file_contents(). Actually checking for the return code of the function might have helped too, but anyway.

In any case, care should be taken to:

- fix the permissions of existing .Xauthority files in a secure way
- correctly set the umask (or use a function which does it) before writing a new file