From 18decb7722e9bf2625d7d93c7953c915837a0aa1 Mon Sep 17 00:00:00 2001 From: delphij Date: Tue, 30 Jun 2015 23:21:48 +0000 Subject: [PATCH] [EN-15:08] Revised: Improvements to sendmail TLS/DH interoperability. [EN-15:09] Fix inconsistency between locale and rune locale states. Approved by: so git-svn-id: svn://svn.freebsd.org/base/releng/9.3@284986 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f --- UPDATING | 8 ++++++++ contrib/sendmail/src/sendmail.h | 2 +- lib/libc/locale/setrunelocale.c | 2 ++ lib/libc/locale/xlocale.c | 16 +++++++--------- sys/conf/newvers.sh | 2 +- 5 files changed, 19 insertions(+), 11 deletions(-) diff --git a/UPDATING b/UPDATING index 1c0be982a..0f6bb6b90 100644 --- a/UPDATING +++ b/UPDATING @@ -11,6 +11,14 @@ handbook: Items affecting the ports and packages system can be found in /usr/ports/UPDATING. Please read that file before running portupgrade. +20150630: p18 FreeBSD-EN-15:08.sendmail [revised] + FreeBSD-EN-15:09.xlocale + + Improvements to sendmail TLS/DH interoperability. [EN-15:08] + + Fix inconsistency between locale and rune locale states. + [EN-15:09] + 20150618: p17 FreeBSD-EN-15:08.sendmail Improvements to sendmail TLS/DH interoperability. [EN-15:08] diff --git a/contrib/sendmail/src/sendmail.h b/contrib/sendmail/src/sendmail.h index 1a079c0e1..07a58e9f9 100644 --- a/contrib/sendmail/src/sendmail.h +++ b/contrib/sendmail/src/sendmail.h @@ -1935,7 +1935,7 @@ struct termescape /* server requirements */ #define TLS_I_SRV (TLS_I_SRV_CERT | TLS_I_RSA_TMP | TLS_I_VRFY_PATH | \ - TLS_I_VRFY_LOC | TLS_I_TRY_DH | TLS_I_DH512 | \ + TLS_I_VRFY_LOC | TLS_I_TRY_DH | TLS_I_DH1024 | \ TLS_I_CACHE) /* client requirements */ diff --git a/lib/libc/locale/setrunelocale.c b/lib/libc/locale/setrunelocale.c index 927b200a2..32c2d356b 100644 --- a/lib/libc/locale/setrunelocale.c +++ b/lib/libc/locale/setrunelocale.c @@ -202,6 +202,8 @@ __set_thread_rune_locale(locale_t loc) if (loc == NULL) { _ThreadRuneLocale = &_DefaultRuneLocale; + } else if (loc == LC_GLOBAL_LOCALE) { + _ThreadRuneLocale = 0; } else { _ThreadRuneLocale = XLOCALE_CTYPE(loc)->runes; } diff --git a/lib/libc/locale/xlocale.c b/lib/libc/locale/xlocale.c index e114bac74..f9b7db107 100644 --- a/lib/libc/locale/xlocale.c +++ b/lib/libc/locale/xlocale.c @@ -154,23 +154,24 @@ __get_locale(void) static void set_thread_locale(locale_t loc) { + locale_t l = (loc == LC_GLOBAL_LOCALE) ? 0 : loc; _once(&once_control, init_key); - if (NULL != loc) { - xlocale_retain((struct xlocale_refcounted*)loc); + if (NULL != l) { + xlocale_retain((struct xlocale_refcounted*)l); } locale_t old = pthread_getspecific(locale_info_key); - if ((NULL != old) && (loc != old)) { + if ((NULL != old) && (l != old)) { xlocale_release((struct xlocale_refcounted*)old); } if (fake_tls) { - thread_local_locale = loc; + thread_local_locale = l; } else { - pthread_setspecific(locale_info_key, loc); + pthread_setspecific(locale_info_key, l); } #ifndef __NO_TLS - __thread_locale = loc; + __thread_locale = l; __set_thread_rune_locale(loc); #endif } @@ -361,9 +362,6 @@ locale_t uselocale(locale_t loc) { locale_t old = get_thread_locale(); if (NULL != loc) { - if (LC_GLOBAL_LOCALE == loc) { - loc = NULL; - } set_thread_locale(loc); } return (old ? old : LC_GLOBAL_LOCALE); diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh index 4c4debea7..bc28979bf 100644 --- a/sys/conf/newvers.sh +++ b/sys/conf/newvers.sh @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="9.3" -BRANCH="RELEASE-p17" +BRANCH="RELEASE-p18" if [ "X${BRANCH_OVERRIDE}" != "X" ]; then BRANCH=${BRANCH_OVERRIDE} fi -- 2.42.0