]> rtime.felk.cvut.cz Git - sojka/debian/lightdm.git/blobdiff - debian/patches/04_fix_xauthority-path.patch
new upstream release
[sojka/debian/lightdm.git] / debian / patches / 04_fix_xauthority-path.patch
index c1243e39a0554869fce32e1c1db1e5004c6eca42..03752a522f095732e4ae6146cd15d147a2acf7e1 100644 (file)
@@ -1,11 +1,11 @@
-=== modified file 'src/display-manager.c'
---- lightdm/src/display-manager.c      2010-11-17 03:23:08 +0000
-+++ lightdm/src/display-manager.c      2010-12-04 15:38:08 +0000
-@@ -146,36 +146,44 @@
-     session_set_env (session, "LDM_DISPLAY", string);
-     g_free (string);
+Index: lightdm-0.3.0/src/display-manager.c
+===================================================================
+--- lightdm-0.3.0.orig/src/display-manager.c   2011-04-16 10:16:26.000000000 +0200
++++ lightdm-0.3.0/src/display-manager.c        2011-04-18 15:23:49.470536842 +0200
+@@ -144,14 +144,6 @@
+     }
  
--    authorization = xserver_get_authorization (display_get_xserver (display));
+     authorization = xserver_get_authorization (display_get_xserver (display));
 -    if (authorization)
 -    {
 -        gchar *path;
 -        session_set_authorization (session, authorization, path);
 -        g_free (path);
 -    }
--
      if (is_greeter)
      {
-         gchar *filename;
+@@ -159,6 +151,14 @@
          filename = g_strdup_printf ("%s-greeter.log", xserver_get_address (display_get_xserver (display)));
-         string = g_build_filename (manager->priv->log_dir, filename, NULL);
+         log_filename = g_build_filename (manager->priv->log_dir, filename, NULL);
          g_free (filename);
-+        authorization = xserver_get_authorization (display_get_xserver (display));
 +        if (authorization)
 +        {
 +            gchar *path;
 +            session_set_authorization (session, authorization, path);
 +            g_free (path);
 +        }
-+
      }
      else
      {
-+        struct passwd *user_info = getpwnam (session_get_username (session));
-+        if (user_info)
-+            string = g_build_filename (user_info->pw_dir, ".xsession-errors", NULL);
-+        else
-+            g_warning ("Failed to get user info for user '%s'", session_get_username (session));
-+
-+        authorization = xserver_get_authorization (display_get_xserver (display));
-+        if (authorization)
-+        {
-+            gchar *path;
-+
-+            path = g_build_filename(user_info->pw_dir, ".Xauthority", NULL);
-+            session_set_authorization (session, authorization, path);
-+            g_free (path);
-+        }
+@@ -172,6 +172,14 @@
+                 log_filename = g_build_filename (user_info->pw_dir, ".xsession-errors", NULL);
+             else
+                 g_warning ("Failed to get user info for user '%s'", session_get_username (session));
++            if (authorization)
++            {
++                gchar *path;
 +
-         // FIXME: Copy old error file
-         if (manager->priv->test_mode)
-             string = g_strdup (".xsession-errors");
--        else
--        {
--            struct passwd *user_info = getpwnam (session_get_username (session));
--            if (user_info)
--                string = g_build_filename (user_info->pw_dir, ".xsession-errors", NULL);
--            else
--                g_warning ("Failed to get user info for user '%s'", session_get_username (session));
--        }
++                path = g_build_filename(user_info->pw_dir, ".Xauthority", NULL);
++                session_set_authorization (session, authorization, path);
++                g_free (path);
++            }
+         }
      }
-     g_debug ("Logging to %s", string);
-     session_set_log_file (session, string);
-
+