? .logrtns.c.swp
? gnome-utils-2.12.1-logviewtty.patch
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/gnome-utils/logview/ChangeLog,v
retrieving revision 1.250
diff -u -p -r1.250 ChangeLog
--- ChangeLog	6 Oct 2005 14:03:58 -0000	1.250
+++ ChangeLog	12 Oct 2005 16:14:04 -0000
@@ -1,3 +1,9 @@
+2005-10-12  Frederic Crozat  <fcrozat@mandriva.com>
+
+	* logrtns.c: (isLogFile): Only accept regular file as
+	logfile, prevent freeze when /dev/tty* is in syslog.conf.
+	Bug #318689.
+
 2005-10-06  noel  <vnoel@cox.net>
 
 	* log_repaint.c (logview_draw_log_lines): Prevent cast
Index: logrtns.c
===================================================================
RCS file: /cvs/gnome/gnome-utils/logview/logrtns.c,v
retrieving revision 1.59
diff -u -p -r1.59 logrtns.c
--- logrtns.c	4 Oct 2005 22:30:28 -0000	1.59
+++ logrtns.c	12 Oct 2005 16:14:05 -0000
@@ -334,11 +334,18 @@ isLogFile (char *filename, gboolean show
    GnomeVFSHandle *handle;
    GnomeVFSResult result;
    GnomeVFSFileSize size;
+   GnomeVFSFileInfo info;
 
    /* Read first line and check that it is text */
    result = gnome_vfs_open (&handle, filename, GNOME_VFS_OPEN_READ);
    if (result != GNOME_VFS_OK)
 	   return FALSE;
+
+   result = gnome_vfs_get_file_info_from_handle (handle, &info, GNOME_VFS_FILE_INFO_FOLLOW_LINKS);
+   if (result != GNOME_VFS_OK || info.type != GNOME_VFS_FILE_TYPE_REGULAR) {
+	   gnome_vfs_close (handle);
+	   return FALSE;
+   }
 
    result = gnome_vfs_read (handle, buff, sizeof(buff), &size);
    gnome_vfs_close (handle);
