ldap/admin/src/scripts/start-dirsrv.in | 9 ++++++---
ldap/admin/src/scripts/stop-dirsrv.in | 9 ++++++---
ldap/servers/slapd/libglobs.c | 2 +-
ldap/servers/slapd/ssl.c | 12 ++++++++++--
4 files changed, 23 insertions(+), 9 deletions(-)
New commits:
commit 37d569605e23b94192b7aaf06fb44dca4a73fe0e
Author: Noriko Hosoi <nhosoi(a)redhat.com>
Date: Sun Apr 12 17:46:52 2015 -0700
Ticket 408 - Backport of Normalized DN Cache
Description: commit 2a8da7ea76d15906fdb98b47534fc3447f12c752 set the
type of nsslapd-ndn-cache-enabled to CONFIG_INT. This patch corrects
it to CONFIG_ON_OFF.
diff --git a/ldap/servers/slapd/libglobs.c b/ldap/servers/slapd/libglobs.c
index dbb0fa8..3672d99 100644
--- a/ldap/servers/slapd/libglobs.c
+++ b/ldap/servers/slapd/libglobs.c
@@ -1037,7 +1037,7 @@ static struct config_get_and_set {
CONFIG_ON_OFF, (ConfigGetFunc)config_get_ignore_time_skew,
&init_ignore_time_skew},
{CONFIG_NDN_CACHE, config_set_ndn_cache_enabled,
NULL, 0,
- (void**)&global_slapdFrontendConfig.ndn_cache_enabled, CONFIG_INT,
+ (void**)&global_slapdFrontendConfig.ndn_cache_enabled, CONFIG_ON_OFF,
(ConfigGetFunc)config_get_ndn_cache_enabled},
{CONFIG_NDN_CACHE_SIZE, config_set_ndn_cache_max_size,
NULL, 0,
commit 349db8decaff0d3a3b63aafc22c4b1714c4e9573
Author: Noriko Hosoi <nhosoi(a)redhat.com>
Date: Sun Apr 12 16:44:40 2015 -0700
Ticket #48148 - start/stop/restart-dirsrv utilities should ignore admin-serv
directory
Description: {start,stop}-dirsrv script scans /etc/sysconfig/dirsrv-* to find
out the server instances to start/stop, which could include dirsrv-admin for
the Admin server if 389-admin is installed.
This patch silently skips "dirsrv-admin" from the server start/stop.
diff --git a/ldap/admin/src/scripts/start-dirsrv.in
b/ldap/admin/src/scripts/start-dirsrv.in
index 291c821..0a38c4c 100755
--- a/ldap/admin/src/scripts/start-dirsrv.in
+++ b/ldap/admin/src/scripts/start-dirsrv.in
@@ -19,8 +19,12 @@ start_instance() {
shift
# source env. for this instance
- if [ -f $initconfig_dir/@package_name@-$SERV_ID ] ; then
- . $initconfig_dir/@package_name@-$SERV_ID
+ if [ $SERV_ID == "admin" ] ; then
+ # ignore admin
+ return 0
+ elif [ -f $initconfig_dir/dirsrv-$SERV_ID ] ; then
+ echo Starting instance \"$SERV_ID\"
+ . $initconfig_dir/dirsrv-$SERV_ID
else
echo Instance $SERV_ID not found.
return 1
@@ -127,7 +131,6 @@ if [ "$#" -eq 0 ]; then
for i in $initconfig_dir/@package_name@-*; do
regex=s,$initconfig_dir/@package_name@-,,g
inst=`echo $i | sed -e $regex`
- echo Starting instance \"$inst\"
start_instance $inst
if [ "$?" -ne 0 ]; then
ret=$?
diff --git a/ldap/admin/src/scripts/stop-dirsrv.in
b/ldap/admin/src/scripts/stop-dirsrv.in
index 4d88585..076af87 100755
--- a/ldap/admin/src/scripts/stop-dirsrv.in
+++ b/ldap/admin/src/scripts/stop-dirsrv.in
@@ -10,8 +10,12 @@ stop_instance() {
SERV_ID=$1
# source env. for this instance
- if [ -f $initconfig_dir/@package_name@-$SERV_ID ] ; then
- . $initconfig_dir/@package_name@-$SERV_ID
+ if [ $SERV_ID == "admin" ] ; then
+ # ignore admin
+ return 0
+ elif [ -f $initconfig_dir/dirsrv-$SERV_ID ] ; then
+ echo Stopping instance \"$SERV_ID\"
+ . $initconfig_dir/dirsrv-$SERV_ID
else
echo Instance $SERV_ID not found.
return 1
@@ -75,7 +79,6 @@ if [ "$#" -eq 0 ]; then
for i in $initconfig_dir/@package_name@-*; do
regex=s,$initconfig_dir/@package_name@-,,g
inst=`echo $i | sed -e $regex`
- echo Stopping instance \"$inst\"
stop_instance $inst
if [ "$?" -ne 0 ]; then
ret=$?
commit f0d0930540bf41e5551fb629f18c35edcd67acfd
Author: Noriko Hosoi <nhosoi(a)redhat.com>
Date: Sat Apr 11 23:34:30 2015 -0700
Ticket #47928 - Disable SSL v3, by default [389-ds-base-1.2.11 only]
Description: commit 17fc03cf1101135b99234f17efd3eb746626be1a introduced a
defect "bz 1210996 - TLS1 can't be turned off". This patch correctly
sets
SSLv3 to minimum and maximum version if nsTLS1 is off. If both nsSSL3 and
nsTLS1 is off, it forces to enable nsTLS1 and log it in the error log.
diff --git a/ldap/servers/slapd/ssl.c b/ldap/servers/slapd/ssl.c
index c30ebd6..5451d6e 100644
--- a/ldap/servers/slapd/ssl.c
+++ b/ldap/servers/slapd/ssl.c
@@ -1352,6 +1352,7 @@ int slapd_ssl_init2(PRFileDesc **fd, int startTLS)
}
}
slapi_ch_free_string( &val );
+ freeConfigEntry( &e );
}
#if !defined(NSS_TLS10) /* NSS_TLS11 or newer */
if (NSSVersionMin > 0) {
@@ -1359,9 +1360,16 @@ int slapd_ssl_init2(PRFileDesc **fd, int startTLS)
/* Use new NSS API SSL_VersionRangeSet (NSS3.14 or newer) */
if (enableTLS1) {
NSSVersionMin = SSL_LIBRARY_VERSION_TLS_1_0;
+ } else {
+ NSSVersionMin = SSL_LIBRARY_VERSION_3_0;
+ NSSVersionMax = SSL_LIBRARY_VERSION_3_0;
}
if (enableSSL3) {
NSSVersionMin = SSL_LIBRARY_VERSION_3_0;
+ } else if (!enableTLS1) {
+ slapd_SSL_error("SSL Initialization 2: Both nsSSL3 and nsTLS1 are off.
Enabling nsTLS1.");
+ NSSVersionMin = SSL_LIBRARY_VERSION_TLS_1_0;
+ NSSVersionMax = enabledNSSVersions.max;
}
slapdNSSVersions.min = NSSVersionMin;
slapdNSSVersions.max = NSSVersionMax;
@@ -1375,8 +1383,9 @@ int slapd_ssl_init2(PRFileDesc **fd, int startTLS)
/* Set the restricted value to the cn=encryption entry */
} else {
slapd_SSL_error("SSL Initialization 2: "
- "Failed to set SSL range: min: %s, max: %s\n",
+ "Failed to set SSL range: min: %s, max: %s.",
mymin, mymax);
+ return 0;
}
} else {
#endif
@@ -1401,7 +1410,6 @@ int slapd_ssl_init2(PRFileDesc **fd, int startTLS)
#if !defined(NSS_TLS10) /* NSS_TLS11 or newer */
}
#endif
- freeConfigEntry( &e );
if(( slapd_SSLclientAuth = config_get_SSLclientAuth()) != SLAPD_SSLCLIENTAUTH_OFF )
{
int err;