summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>2008-05-14 04:28:51 +0000
committerMiles Bader <miles@gnu.org>2008-05-14 04:28:51 +0000
commitecae6af979abcbb5b45c33ee05ceb297678ec9a0 (patch)
tree44e29aca29b1f5bc76cf9f856df0286596cc5184
parent131b3b112ad5405132ad5db55e0562b50477a94c (diff)
parentbb16531656a1daf7deec8a14e3a8a5fdb2c87818 (diff)
downloademacs-ecae6af979abcbb5b45c33ee05ceb297678ec9a0.tar.gz
Merge from emacs--rel--22
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-1159
-rw-r--r--lisp/ChangeLog6
-rw-r--r--lisp/obsolete/fast-lock.el7
-rw-r--r--src/ChangeLog10
-rw-r--r--src/emacs.c12
-rw-r--r--src/syssignal.h14
5 files changed, 37 insertions, 12 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index e154ef40d7c..964fc9ab424 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
+2008-05-14 Simon Marshall <simon@gnu.org>
+
+ * obsolete/fast-lock.el (fast-lock-cache-directories): Remove "."
+ from its default value and give it the risky-local-variable
+ property (CVE-2008-2142).
+
2008-05-14 Kenichi Handa <handa@m17n.org>
* language/korean.el ("Korean"): Set `iso639-language'
diff --git a/lisp/obsolete/fast-lock.el b/lisp/obsolete/fast-lock.el
index 0b85618ec1d..eba7b5bd3e4 100644
--- a/lisp/obsolete/fast-lock.el
+++ b/lisp/obsolete/fast-lock.el
@@ -270,7 +270,7 @@ for buffers in Rmail mode, and size is irrelevant otherwise."
(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.
@@ -288,12 +288,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.
diff --git a/src/ChangeLog b/src/ChangeLog
index 41f2467664b..ed2059ebd37 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,13 @@
+2008-05-14 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
+
+ * emacs.c (main_thread): Conditionalize on
+ FORWARD_SIGNAL_TO_MAIN_THREAD instead of HAVE_GTK_AND_PTHREAD.
+ (main) [FORWARD_SIGNAL_TO_MAIN_THREAD]: Initialize it.
+
+ * syssignal.h (FORWARD_SIGNAL_TO_MAIN_THREAD): New define.
+ (main_thread, SIGNAL_THREAD_CHECK): Conditionalize on
+ FORWARD_SIGNAL_TO_MAIN_THREAD instead of HAVE_GTK_AND_PTHREAD.
+
2008-05-14 Kenichi Handa <handa@m17n.org>
* coding.c (detect_coding_iso_2022): Ignore a coding category that
diff --git a/src/emacs.c b/src/emacs.c
index 7074076cf66..c401afafbd7 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -355,10 +355,10 @@ int fatal_error_in_progress;
void (*fatal_error_signal_hook) P_ ((void));
-#ifdef HAVE_GTK_AND_PTHREAD
-/* When compiled with GTK and running under Gnome, multiple threads may be
- created. Keep track of our main thread to make sure signals are delivered
- to it (see syssignal.h). */
+#ifdef FORWARD_SIGNAL_TO_MAIN_THREAD
+/* When compiled with GTK and running under Gnome, or Carbon under Mac
+ OS X, multiple threads may be created. Keep track of our main
+ thread to make sure signals are delivered to it (see syssignal.h). */
pthread_t main_thread;
#endif
@@ -1035,9 +1035,9 @@ main (argc, argv
# endif /* not SYNC_INPUT */
#endif /* not SYSTEM_MALLOC */
-#ifdef HAVE_GTK_AND_PTHREAD
+#ifdef FORWARD_SIGNAL_TO_MAIN_THREAD
main_thread = pthread_self ();
-#endif /* HAVE_GTK_AND_PTHREAD */
+#endif /* FORWARD_SIGNAL_TO_MAIN_THREAD */
#if defined (MSDOS) || defined (WINDOWSNT)
/* We do all file input/output as binary files. When we need to translate
diff --git a/src/syssignal.h b/src/syssignal.h
index 53877ca107d..0ab4598b507 100644
--- a/src/syssignal.h
+++ b/src/syssignal.h
@@ -21,8 +21,14 @@ Boston, MA 02110-1301, USA. */
extern void init_signals P_ ((void));
-#ifdef HAVE_GTK_AND_PTHREAD
+#if defined (HAVE_GTK_AND_PTHREAD) || (defined (HAVE_CARBON) && MAC_OS_X_VERSION_MAX_ALLOWED >= 1020)
#include <pthread.h>
+/* If defined, asynchronous signals delivered to a non-main thread are
+ forwarded to the main thread. */
+#define FORWARD_SIGNAL_TO_MAIN_THREAD
+#endif
+
+#ifdef FORWARD_SIGNAL_TO_MAIN_THREAD
extern pthread_t main_thread;
#endif
@@ -208,7 +214,7 @@ extern SIGMASKTYPE sigprocmask_set;
char *strsignal ();
#endif
-#ifdef HAVE_GTK_AND_PTHREAD
+#ifdef FORWARD_SIGNAL_TO_MAIN_THREAD
#define SIGNAL_THREAD_CHECK(signo) \
do { \
if (!pthread_equal (pthread_self (), main_thread)) \
@@ -227,8 +233,8 @@ char *strsignal ();
} \
} while (0)
-#else /* not HAVE_GTK_AND_PTHREAD */
+#else /* not FORWARD_SIGNAL_TO_MAIN_THREAD */
#define SIGNAL_THREAD_CHECK(signo)
-#endif /* not HAVE_GTK_AND_PTHREAD */
+#endif /* not FORWARD_SIGNAL_TO_MAIN_THREAD */
/* arch-tag: 4580e86a-340d-4574-9e11-a742b6e1a152
(do not change this comment) */