diff -Naurp gdm-2.32.0.orig/daemon/gdm-session-worker.c gdm-2.32.0/daemon/gdm-session-worker.c
--- gdm-2.32.0.orig/daemon/gdm-session-worker.c	2010-09-15 22:58:10.000000000 +0400
+++ gdm-2.32.0/daemon/gdm-session-worker.c	2011-01-14 16:27:41.222771057 +0300
@@ -1887,6 +1887,18 @@ _fd_is_normal_file (int fd)
         return S_ISREG (file_info.st_mode);
 }
 
+static gboolean
+_is_normal_file (char *filename)
+{
+        struct stat file_info;
+
+        if (lstat (filename, &file_info) < 0) {
+                return FALSE;
+        }
+
+        return S_ISREG (file_info.st_mode);
+}
+
 static int
 _open_session_log (const char *dir)
 {
@@ -1895,7 +1907,8 @@ _open_session_log (const char *dir)
 
         filename = g_build_filename (dir, GDM_SESSION_LOG_FILENAME, NULL);
 
-        if (g_access (dir, R_OK | W_OK | X_OK) == 0 && g_access (filename, R_OK | W_OK) == 0) {
+        if (g_access (dir, R_OK | W_OK | X_OK) == 0 && _is_normal_file(filename)
+			&& g_access (filename, R_OK | W_OK) == 0) {
                 char *filename_old;
 
                 filename_old = g_strdup_printf ("%s.old", filename);
