summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Müller <ulm@gentoo.org>2008-05-13 00:10:43 +0000
committerUlrich Müller <ulm@gentoo.org>2008-05-13 00:10:43 +0000
commit4d2b742f8c5bfeb3592006fbd8863df235eecc6f (patch)
treebbe359ffcced8952bc607c60ad61fa2fa7025a99 /app-editors/emacs/files
parentStable for HPPA (bug #221063). (diff)
downloadgentoo-2-4d2b742f8c5bfeb3592006fbd8863df235eecc6f.tar.gz
gentoo-2-4d2b742f8c5bfeb3592006fbd8863df235eecc6f.tar.bz2
gentoo-2-4d2b742f8c5bfeb3592006fbd8863df235eecc6f.zip
Security fix for fast-lock cache, CVE-2008-2142, bug 221197.
(Portage version: 2.1.5_rc10)
Diffstat (limited to 'app-editors/emacs/files')
-rw-r--r--app-editors/emacs/files/emacs-22.2-fast-lock.patch31
1 files changed, 31 insertions, 0 deletions
diff --git a/app-editors/emacs/files/emacs-22.2-fast-lock.patch b/app-editors/emacs/files/emacs-22.2-fast-lock.patch
new file mode 100644
index 000000000000..e1c00a5cb305
--- /dev/null
+++ b/app-editors/emacs/files/emacs-22.2-fast-lock.patch
@@ -0,0 +1,31 @@
+--- emacs-22.2-orig/lisp/obsolete/fast-lock.el 2008-01-10 13:15:40.000000000 +0100
++++ emacs-22.2/lisp/obsolete/fast-lock.el 2008-05-12 21:25:57.000000000 +0200
+@@ -286,7 +286,7 @@
+ (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,13 +304,18 @@
+ ((\"^/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)
+
++;;;###autoload
++(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.
+ Valid events are `save-buffer', `kill-buffer' and `kill-emacs'.