Thu Jun 5 11:49:47 2008 UTC ()
pullup ticket #2412 - requested by markd
emacs: Fix for CVE-2008-2142

revisions pulled up:
- pkgsrc/editors/emacs/Makefile		1.113
- pkgsrc/editors/emacs/distinfo		1.37
- pkgsrc/editors/emacs/patches/patch-aw	1.4

   Module Name:	pkgsrc
   Committed By:	markd
   Date:		Mon Jun  2 21:09:48 UTC 2008

   Modified Files:
   	pkgsrc/editors/emacs: Makefile distinfo
   Added Files:
   	pkgsrc/editors/emacs/patches: patch-aw

   Log Message:
   Fix for CVE-2008-2142, automatically loading and executing .flc files.


(rtr)
diff -r1.106.4.2 -r1.106.4.3 pkgsrc/editors/emacs/Makefile
diff -r1.35.8.1 -r1.35.8.2 pkgsrc/editors/emacs/distinfo
diff -r0 -r1.3.36.1 pkgsrc/editors/emacs/patches/patch-aw

cvs diff -r1.106.4.2 -r1.106.4.3 pkgsrc/editors/emacs/Makefile (expand / switch to context diff)
--- pkgsrc/editors/emacs/Makefile 2008/05/05 18:20:22 1.106.4.2
+++ pkgsrc/editors/emacs/Makefile 2008/06/05 11:49:47 1.106.4.3
@@ -1,10 +1,10 @@
-# $NetBSD: Makefile,v 1.106.4.2 2008/05/05 18:20:22 spz Exp $
+# $NetBSD: Makefile,v 1.106.4.3 2008/06/05 11:49:47 rtr Exp $
 
 PKGNAME?=	${DISTNAME}
 COMMENT?=	GNU editing macros (editor)
 
 DISTNAME=	emacs-22.1
-PKGREVISION=	4
+PKGREVISION=	5
 CATEGORIES=	editors
 MASTER_SITES=	${MASTER_SITE_GNU:=emacs/}
 
@@ -63,6 +63,7 @@
 # for patch-ac
 post-build:
 	(cd ${WRKSRC}/lisp; ${MAKE_PROGRAM} files.elc)
+	(cd ${WRKSRC}/lisp; ${MAKE_PROGRAM} obsolete/fast-lock.elc)
 	touch ${WRKSRC}/etc/DOC
 	touch ${WRKSRC}/src/emacs
 

cvs diff -r1.35.8.1 -r1.35.8.2 pkgsrc/editors/emacs/Attic/distinfo (expand / switch to context diff)
--- pkgsrc/editors/emacs/Attic/distinfo 2008/05/01 13:41:33 1.35.8.1
+++ pkgsrc/editors/emacs/Attic/distinfo 2008/06/05 11:49:47 1.35.8.2
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.35.8.1 2008/05/01 13:41:33 rtr Exp $
+$NetBSD: distinfo,v 1.35.8.2 2008/06/05 11:49:47 rtr Exp $
 
 SHA1 (emacs-22.1.tar.gz) = 327664173eabe5db49d4e7e4a4b1794577af902e
 RMD160 (emacs-22.1.tar.gz) = da5360871db8b1d473ff7f0b0937ee6c278c0b19
@@ -21,4 +21,5 @@
 SHA1 (patch-at) = 470cbad6632038ff85aa942f74cab601e7f707fe
 SHA1 (patch-au) = e5d90961b4d78c37dec196097a16e0b6ac22e3bb
 SHA1 (patch-av) = 252f3085a1e4986a25b46afa74837ca0562f4f05
+SHA1 (patch-aw) = 456feb2517cad514837b75863336265006c158ee
 SHA1 (patch-xx) = c486e9ca2c9134caf60ec935bf086e29324b1979

File Added: pkgsrc/editors/emacs/patches/Attic/patch-aw
$NetBSD: patch-aw,v 1.3.36.1 2008/06/05 11:49:47 rtr Exp $

fix for CVE-2008-2142 from post 22.2 cvs.

--- lisp/obsolete/fast-lock.el.orig	2007-01-21 16:53:09.000000000 +1300
+++ lisp/obsolete/fast-lock.el
@@ -286,7 +286,7 @@ for buffers in Rmail mode, and size is i
 				      (integer :tag "size")))))
   :group 'fast-lock)
 
-(defcustom fast-lock-cache-directories '("." "~/.emacs-flc")
+(defcustom fast-lock-cache-directories '("~/.emacs-flc")
 ; - `internal', keep each file's Font Lock cache file in the same file.
 ; - `external', keep each file's Font Lock cache file in the same directory.
   "*Directories in which Font Lock cache files are saved and read.
@@ -304,12 +304,15 @@ For example:
  ((\"^/your/true/home/directory/\" . \".\") \"~/.emacs-flc\")
 
 would cause a file's current directory to be used if the file is under your
-home directory hierarchy, or otherwise the absolute directory `~/.emacs-flc'."
+home directory hierarchy, or otherwise the absolute directory `~/.emacs-flc'.
+For security reasons, it is not advisable to use the file's current directory
+to avoid the possibility of using the cache of another user."
   :type '(repeat (radio (directory :tag "directory")
 			(cons :tag "Matching"
 			      (regexp :tag "regexp")
 			      (directory :tag "directory"))))
   :group 'fast-lock)
+(put 'fast-lock-cache-directories 'risky-local-variable t)
 
 (defcustom fast-lock-save-events '(kill-buffer kill-emacs)
   "*Events under which caches will be saved.