--- gdm2/ChangeLog.org	2007-07-01 21:46:34.000000000 +0100
+++ gdm2/ChangeLog	2007-07-01 21:49:22.000000000 +0100
@@ -0,0 +1,7 @@
+2007-07-01  Lukasz Zalewski <lukas@dcs.qmul.ac.uk>
+
+	* gui/greeter/greeter.c: when getting the theme file added
+	  a check if the file is readable (the check was only for
+	  the file existance previously) + some error messages.
+	  Fixes issues raised in bug #451989
+	
--- gdm2/gui/greeter/greeter.c.org	2007-07-01 21:37:03.000000000 +0100
+++ gdm2/gui/greeter/greeter.c	2007-07-02 00:07:37.000000000 +0100
@@ -1129,15 +1129,17 @@
   *theme_dir = dir;
 
   info = g_build_filename (dir, "GdmGreeterTheme.desktop", NULL);
-  if (g_access (info, F_OK) != 0) {
+  if (g_access (info, R_OK) != 0) {
+	  g_debug ("Could not open %s. The file either doesn't exist or is not readable", info);
 	  g_free (info);
 	  info = g_build_filename (dir, "GdmGreeterTheme.info", NULL);
   }
-  if (g_access (info, F_OK) != 0)
+  if (g_access (info, R_OK) != 0)
     {
       char *base = g_path_get_basename (in);
       /* just guess the name, we have no info about the theme at
        * this point */
+      g_debug ("Could not open %s. The file either doesn't exist or is not readable", info);
       g_free (info);
       file = g_strdup_printf ("%s/%s.xml", dir, base);
       g_free (base);
