File lightdm-remove-xauthority-ownership-fix.patch of Package lightdm.openSUSE_12.1
# HG changeset patch
# Parent 50fa5a8c7f9d9a5b15b246ab29b0fedd373d42d4
removed the code correcting the ownership of .Xauthority files, it is still not secure and the buggy LightDM version writing .Xauthrotiy as root never was in a released openSUSE version anyway
diff --git a/src/xsession.c b/src/xsession.c
--- a/src/xsession.c
+++ b/src/xsession.c
@@ -102,16 +102,6 @@ xsession_setup (Session *session)
else
{
path = g_build_filename (user_get_home_directory (session_get_user (session)), ".Xauthority", NULL);
-
- /* Workaround the case where the authority file might have been
- * incorrectly written as root in a buggy version of LightDM */
- if (getuid () == 0)
- {
- int result;
- result = lchown (path, user_get_uid (session_get_user (session)), user_get_gid (session_get_user (session)));
- if (result < 0 && errno != ENOENT)
- g_warning ("Failed to correct ownership of %s: %s", path, strerror (errno));
- }
}
session_set_env (session, "XAUTHORITY", path);