From da5d6dbe3974a8012d4fb6a0281d583965742aaa Mon Sep 17 00:00:00 2001 From: "Basil L. Contovounesios" Date: Sat, 7 Jul 2018 19:33:08 +0300 Subject: [PATCH 1/6] Fix (length NON-SEQUENCE) documentation Suggested by Eli Zaretskii in the following threads: https://lists.gnu.org/archive/html/emacs-devel/2018-07/msg00171.html https://lists.gnu.org/archive/html/emacs-devel/2018-07/msg00206.html * doc/lispref/sequences.texi (Sequence Functions): Mention that 'length' signals a 'wrong-type-argument' also when given a non-sequencep argument. --- doc/lispref/sequences.texi | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/doc/lispref/sequences.texi b/doc/lispref/sequences.texi index 59faf2b4f1e..188a3451140 100644 --- a/doc/lispref/sequences.texi +++ b/doc/lispref/sequences.texi @@ -71,13 +71,15 @@ string, bool-vector, or char-table, @code{nil} otherwise. @cindex list length @cindex vector length @cindex sequence length +@cindex bool-vector length @cindex char-table length @anchor{Definition of length} -This function returns the number of elements in @var{sequence}. If -@var{sequence} is a dotted list, a @code{wrong-type-argument} error is -signaled; if it is a circular list, a @code{circular-list} error is -signaled. For a char-table, the value returned is always one more -than the maximum Emacs character code. +This function returns the number of elements in @var{sequence}. The +function signals the @code{wrong-type-argument} error if the argument +is not a sequence or is a dotted list; it signals the +@code{circular-list} error if the argument is a circular list. For a +char-table, the value returned is always one more than the maximum +Emacs character code. @xref{Definition of safe-length}, for the related function @code{safe-length}. From e02d8e29c6009dbaf04d3e1668f476ba000c7f02 Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Sun, 8 Jul 2018 13:02:19 +0200 Subject: [PATCH 2/6] Fix Bug#32084 * test/lisp/net/dbus-tests.el (dbus-test02-register-service-own-bus): Unset $DISPLAY when calling dbus-launch, in order to avoid possible X11 authentication errors. (Bug#32084) --- test/lisp/net/dbus-tests.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/lisp/net/dbus-tests.el b/test/lisp/net/dbus-tests.el index 624d15ef5f1..8fcb8a564bb 100644 --- a/test/lisp/net/dbus-tests.el +++ b/test/lisp/net/dbus-tests.el @@ -133,7 +133,8 @@ This includes initialization and closing the bus." ;; Start bus. (let ((output (ignore-errors - (shell-command-to-string "dbus-launch --sh-syntax"))) + (shell-command-to-string + "env DISPLAY= dbus-launch --sh-syntax --close-stderr"))) bus pid) (skip-unless (stringp output)) (when (string-match "DBUS_SESSION_BUS_ADDRESS='\\(.+\\)';" output) From 40c2ce743b38197e416e4578cd3fd198a1b06ff5 Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Sun, 8 Jul 2018 13:08:05 +0200 Subject: [PATCH 3/6] Remove test code from last commit --- test/lisp/net/dbus-tests.el | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test/lisp/net/dbus-tests.el b/test/lisp/net/dbus-tests.el index 8fcb8a564bb..1ada2552b85 100644 --- a/test/lisp/net/dbus-tests.el +++ b/test/lisp/net/dbus-tests.el @@ -133,8 +133,7 @@ This includes initialization and closing the bus." ;; Start bus. (let ((output (ignore-errors - (shell-command-to-string - "env DISPLAY= dbus-launch --sh-syntax --close-stderr"))) + (shell-command-to-string "env DISPLAY= dbus-launch --sh-syntax"))) bus pid) (skip-unless (stringp output)) (when (string-match "DBUS_SESSION_BUS_ADDRESS='\\(.+\\)';" output) From 3302b7cd7f0afe9144cec2343902488fbe02d415 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Sun, 24 Jun 2018 14:48:30 +0200 Subject: [PATCH 4/6] Mention the NSM in the gnutls variable doc strings * gnutls.el (gnutls-algorithm-priority): Mention the Network Security Manager here since this variable is an obvious place for people concerned about network security to look. (gnutls-verify-error): Ditto. (gnutls-min-prime-bits): Ditto. --- lisp/net/gnutls.el | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/lisp/net/gnutls.el b/lisp/net/gnutls.el index 85c9308c0d2..4cc1f5f4c3d 100644 --- a/lisp/net/gnutls.el +++ b/lisp/net/gnutls.el @@ -46,7 +46,13 @@ (defcustom gnutls-algorithm-priority nil "If non-nil, this should be a TLS priority string. For instance, if you want to skip the \"dhe-rsa\" algorithm, -set this variable to \"normal:-dhe-rsa\"." +set this variable to \"normal:-dhe-rsa\". + +This variable can be useful for modifying low-level TLS +connection parameters (for instance if you need to connect to a +host that only accepts a specific algorithm), but general Emacs +network security is handled by the Network Security Manager. See +Info node `(emacs) Network Security'." :group 'gnutls :type '(choice (const nil) string)) @@ -72,7 +78,13 @@ corresponding conditions to be tested are: If the condition test fails, an error will be signaled. If the value of this variable is t, every connection will be subjected -to all of the tests described above." +to all of the tests described above. + +The default value of this variable is nil, which means that no +checks are performed at the gnutls level. Instead the checks are +performed via `open-network-stream' at a higher level by the +Network Security Manager. See Info node `(emacs) Network +Security'." :group 'gnutls :version "24.4" :type '(choice @@ -111,7 +123,14 @@ number with fewer than this number of bits, the handshake is rejected. \(The smaller the prime number, the less secure the key exchange is against man-in-the-middle attacks.) -A value of nil says to use the default GnuTLS value." +A value of nil says to use the default GnuTLS value. + +The default value of this variable is such that virtually any +connection can be established, whether this connection can be +considered cryptographically \"safe\" or not. However, Emacs +network security is handled at a higher level via +`open-network-stream' and the Network Security Manager. See Info +node `(emacs) Network Security'." :type '(choice (const :tag "Use default value" nil) (integer :tag "Number of bits" 512)) :group 'gnutls) From 48efd1c98b3d4714860e4bf355c6af57c6cee827 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sun, 8 Jul 2018 18:22:51 +0300 Subject: [PATCH 5/6] Minor fix of a recent documentation change * lisp/net/gnutls.el (gnutls-algorithm-priority): Clarify the doc string. --- lisp/net/gnutls.el | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lisp/net/gnutls.el b/lisp/net/gnutls.el index 4cc1f5f4c3d..35fe680592a 100644 --- a/lisp/net/gnutls.el +++ b/lisp/net/gnutls.el @@ -50,9 +50,11 @@ set this variable to \"normal:-dhe-rsa\". This variable can be useful for modifying low-level TLS connection parameters (for instance if you need to connect to a -host that only accepts a specific algorithm), but general Emacs -network security is handled by the Network Security Manager. See -Info node `(emacs) Network Security'." +host that only accepts a specific algorithm). However, in +general, Emacs network security is handled by the Network +Security Manager (NSM), and the default value of nil delegates +the job of checking the connection security to the NSM. +See Info node `(emacs) Network Security'." :group 'gnutls :type '(choice (const nil) string)) From 65889a6d127fcbbbdc1e74d26036e91bd24d1405 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 8 Jul 2018 09:04:02 -0700 Subject: [PATCH 6/6] Fix bootstrap infloop in GNU/Linux alpha * src/emacs.c (main): Do not re-exec if EMACS_HEAP_EXEC is already set (Bug#32083). --- src/emacs.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/emacs.c b/src/emacs.c index 017c62308c1..f5e47428ef9 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -707,10 +707,12 @@ main (int argc, char **argv) bool disable_aslr = dumping; # endif - if (disable_aslr && disable_address_randomization ()) + if (disable_aslr && disable_address_randomization () + && !getenv ("EMACS_HEAP_EXEC")) { /* Set this so the personality will be reverted before execs - after this one. */ + after this one, and to work around an re-exec loop on buggy + kernels (Bug#32083). */ xputenv ("EMACS_HEAP_EXEC=true"); /* Address randomization was enabled, but is now disabled.