ldap/schema ldap/servers
by Mark Reynolds
ldap/schema/01core389.ldif | 2
ldap/servers/slapd/libglobs.c | 103 ++++++++++++++++++++++++++++++++----------
2 files changed, 81 insertions(+), 24 deletions(-)
New commits:
commit d58a568921eb8edff21c8203530fef505bab2b18
Author: Mark Reynolds <mreynolds(a)redhat.com>
Date: Tue Jul 15 14:07:56 2014 -0400
Ticket 47790 - Integer config attributes accept invalid
values at server startup
Bug Description: Manually editing the dse.ldif allows invalid values to be set
for some configuration attributes
Fix Description: Check integer config values to make sure they are numbers.
https://fedorahosted.org/389/ticket/47790
Jenkins: passed
Reviewed by: nhosoi(Thanks!)
diff --git a/ldap/schema/01core389.ldif b/ldap/schema/01core389.ldif
index 0e0e75f..1b8a70b 100644
--- a/ldap/schema/01core389.ldif
+++ b/ldap/schema/01core389.ldif
@@ -285,7 +285,7 @@ attributeTypes: ( 2.16.840.1.113730.3.1.2290 NAME 'nsslapd-disk-monitoring-thres
attributeTypes: ( 2.16.840.1.113730.3.1.2291 NAME 'nsslapd-disk-monitoring-grace-period' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
attributeTypes: ( 2.16.840.1.113730.3.1.2292 NAME 'nsslapd-disk-monitoring-logging-critical' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
attributeTypes: ( 2.16.840.1.113730.3.1.2293 NAME 'nsslapd-ndn-cache-enabled' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2294 NAME 'nsslapd-ndn-cache-max-size' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2294 NAME 'nsslapd-ndn-cache-max-size' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
attributeTypes: ( 2.16.840.1.113730.3.1.2295 NAME 'nsslapd-allowed-sasl-mechanisms' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
attributeTypes: ( 2.16.840.1.113730.3.1.2296 NAME 'nsslapd-ignore-virtual-attrs' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
attributeTypes: ( 2.16.840.1.113730.3.1.2297 NAME 'nsslapd-search-return-original-type-switch' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
diff --git a/ldap/servers/slapd/libglobs.c b/ldap/servers/slapd/libglobs.c
index e890aed..b437112 100644
--- a/ldap/servers/slapd/libglobs.c
+++ b/ldap/servers/slapd/libglobs.c
@@ -1746,7 +1746,6 @@ config_set_disk_threshold( const char *attrname, char *value, char *errorbuf, in
errno = 0;
threshold = strtoll(value, &endp, 10);
-
if ( *endp != '\0' || threshold <= 4096 || errno == ERANGE ) {
PR_snprintf ( errorbuf, SLAPI_DSE_RETURNTEXT_SIZE,
"%s: \"%s\" is invalid, threshold must be greater than 4096 and less then %lld",
@@ -1788,8 +1787,7 @@ config_set_disk_grace_period( const char *attrname, char *value, char *errorbuf,
}
period = strtol(value, &endp, 10);
-
- if ( *endp != '\0' || period < 1 ) {
+ if ( *endp != '\0' || period < 1 || errno == ERANGE ) {
PR_snprintf ( errorbuf, SLAPI_DSE_RETURNTEXT_SIZE, "%s: \"%s\" is invalid, grace period must be at least 1 minute",
attrname, value);
retVal = LDAP_OPERATIONS_ERROR;
@@ -1821,9 +1819,17 @@ config_set_ndn_cache_max_size(const char *attrname, char *value, char *errorbuf,
{
slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig();
int retVal = LDAP_SUCCESS;
+ char *endp;
long size;
- size = atol(value);
+ size = strtol(value, &endp, 10);
+ if ( *endp != '\0' || errno == ERANGE){
+ retVal = LDAP_OPERATIONS_ERROR;
+ PR_snprintf(errorbuf, SLAPI_DSE_RETURNTEXT_SIZE, "(%s) value (%s) "
+ "is invalid\n",attrname, value);
+ return retVal;
+ }
+
if(size < 0){
size = 0; /* same as -1 */
}
@@ -1846,13 +1852,21 @@ config_set_sasl_maxbufsize(const char *attrname, char *value, char *errorbuf, in
{
slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig();
int retVal = LDAP_SUCCESS;
- int default_size = atoi(DEFAULT_SASL_MAXBUFSIZE);
- int size;
+ long default_size = atol(DEFAULT_SASL_MAXBUFSIZE);
+ long size;
+ char *endp;
+
+ size = strtol(value, &endp, 10);
+ if ( *endp != '\0' || errno == ERANGE){
+ retVal = LDAP_OPERATIONS_ERROR;
+ PR_snprintf(errorbuf, SLAPI_DSE_RETURNTEXT_SIZE, "(%s) value (%s) "
+ "is invalid\n",attrname, value);
+ return retVal;
+ }
- size = atoi(value);
if(size < default_size){
- PR_snprintf ( errorbuf, SLAPI_DSE_RETURNTEXT_SIZE, "nsslapd-sasl-max-buffer-size is too low (%d), "
- "setting to default value (%d).\n",size, default_size);
+ PR_snprintf ( errorbuf, SLAPI_DSE_RETURNTEXT_SIZE, "nsslapd-sasl-max-buffer-size is too low (%ld), "
+ "setting to default value (%ld).\n",size, default_size);
size = default_size;
}
if(apply){
@@ -1888,7 +1902,6 @@ config_set_port( const char *attrname, char *port, char *errorbuf, int apply ) {
errno = 0;
nPort = strtol(port, &endp, 10);
-
if ( *endp != '\0' || errno == ERANGE || nPort > LDAP_PORT_MAX || nPort < 0 ) {
retVal = LDAP_OPERATIONS_ERROR;
PR_snprintf ( errorbuf, SLAPI_DSE_RETURNTEXT_SIZE,
@@ -1898,8 +1911,7 @@ config_set_port( const char *attrname, char *port, char *errorbuf, int apply ) {
}
if ( nPort == 0 ) {
- LDAPDebug( LDAP_DEBUG_ANY,
- "Information: Non-Secure Port Disabled\n", 0, 0, 0 );
+ LDAPDebug( LDAP_DEBUG_ANY, "Information: Non-Secure Port Disabled\n", 0, 0, 0 );
}
if ( apply ) {
@@ -1926,7 +1938,6 @@ config_set_secureport( const char *attrname, char *port, char *errorbuf, int app
errno = 0;
nPort = strtol(port, &endp, 10);
-
if (*endp != '\0' || errno == ERANGE || nPort > LDAP_PORT_MAX || nPort <= 0 ) {
retVal = LDAP_OPERATIONS_ERROR;
PR_snprintf ( errorbuf, SLAPI_DSE_RETURNTEXT_SIZE,
@@ -2573,7 +2584,7 @@ config_set_pw_minlength( const char *attrname, char *value, char *errorbuf, int
if ( config_value_is_null( attrname, value, errorbuf, 0 )) {
return LDAP_OPERATIONS_ERROR;
}
-
+
errno = 0;
minLength = strtol(value, &endp, 10);
@@ -2960,7 +2971,7 @@ config_set_pw_inhistory( const char *attrname, char *value, char *errorbuf, int
if ( config_value_is_null( attrname, value, errorbuf, 0 )) {
return LDAP_OPERATIONS_ERROR;
}
-
+
errno = 0;
history = strtol(value, &endp, 10);
@@ -3157,6 +3168,7 @@ config_set_pw_gracelimit( const char *attrname, char *value, char *errorbuf, int
if ( config_value_is_null( attrname, value, errorbuf, 0 )) {
return LDAP_OPERATIONS_ERROR;
}
+
errno = 0;
gracelimit = strtol(value, &endp, 10);
@@ -4107,7 +4119,7 @@ config_set_timelimit( const char *attrname, char *value, char *errorbuf, int app
if ( config_value_is_null( attrname, value, errorbuf, 1 )) {
return LDAP_OPERATIONS_ERROR;
}
-
+
errno = 0;
nVal = strtol(value, &endp, 10);
@@ -5747,18 +5759,29 @@ config_set_maxbersize( const char *attrname, char *value, char *errorbuf, int ap
{
int retVal = LDAP_SUCCESS;
slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig();
+ long size;
+ char *endp;
if ( config_value_is_null( attrname, value, errorbuf, 0 )) {
return LDAP_OPERATIONS_ERROR;
}
+ errno = 0;
+ size = strtol(value, &endp, 10);
+ if ( *endp != '\0' || errno == ERANGE){
+ retVal = LDAP_OPERATIONS_ERROR;
+ PR_snprintf(errorbuf, SLAPI_DSE_RETURNTEXT_SIZE, "(%s) value (%s) "
+ "is invalid\n",attrname, value);
+ return retVal;
+ }
+
if ( !apply ) {
return retVal;
}
CFG_LOCK_WRITE(slapdFrontendConfig);
- slapdFrontendConfig->maxbersize = atoi(value);
+ slapdFrontendConfig->maxbersize = size;
CFG_UNLOCK_WRITE(slapdFrontendConfig);
return retVal;
@@ -5789,6 +5812,7 @@ config_set_maxsasliosize( const char *attrname, char *value, char *errorbuf, int
return LDAP_OPERATIONS_ERROR;
}
+ errno = 0;
maxsasliosize = strtol(value, &endptr, 10);
/* Check for non-numeric garbage in the value */
@@ -5842,6 +5866,7 @@ config_set_localssf( const char *attrname, char *value, char *errorbuf, int appl
return LDAP_OPERATIONS_ERROR;
}
+ errno = 0;
localssf = (int) strtol(value, &endptr, 10);
/* Check for non-numeric garbage in the value */
@@ -5884,6 +5909,7 @@ config_set_minssf( const char *attrname, char *value, char *errorbuf, int apply
return LDAP_OPERATIONS_ERROR;
}
+ errno = 0;
minssf = (int) strtol(value, &endptr, 10);
/* Check for non-numeric garbage in the value */
@@ -5970,20 +5996,31 @@ config_set_max_filter_nest_level( const char *attrname, char *value,
{
int retVal = LDAP_SUCCESS;
slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig();
+ char *endp;
+ long level;
if ( config_value_is_null( attrname, value, errorbuf, 0 )) {
return LDAP_OPERATIONS_ERROR;
}
+ errno = 0;
+ level = strtol(value, &endp, 10);
+ if ( *endp != '\0' || errno == ERANGE){
+ retVal = LDAP_OPERATIONS_ERROR;
+ PR_snprintf(errorbuf, SLAPI_DSE_RETURNTEXT_SIZE, "(%s) value (%s) "
+ "is invalid\n",attrname, value);
+ return retVal;
+ }
+
if ( !apply ) {
return retVal;
}
#ifdef ATOMIC_GETSET_FILTER_NEST_LEVEL
- PR_AtomicSet(&slapdFrontendConfig->max_filter_nest_level, atoi(value));
+ PR_AtomicSet(&slapdFrontendConfig->max_filter_nest_level, level);
#else
CFG_LOCK_WRITE(slapdFrontendConfig);
- slapdFrontendConfig->max_filter_nest_level = atoi(value);
+ slapdFrontendConfig->max_filter_nest_level = level;
CFG_UNLOCK_WRITE(slapdFrontendConfig);
#endif
return retVal;
@@ -6677,14 +6714,24 @@ config_set_outbound_ldap_io_timeout( const char *attrname, char *value,
char *errorbuf, int apply )
{
slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig();
+ long timeout;
+ char *endp;
if ( config_value_is_null( attrname, value, errorbuf, 0 )) {
return LDAP_OPERATIONS_ERROR;
}
+ errno = 0;
+ timeout = strtol(value, &endp, 10);
+ if ( *endp != '\0' || errno == ERANGE){
+ PR_snprintf(errorbuf, SLAPI_DSE_RETURNTEXT_SIZE, "(%s) value (%s) "
+ "is invalid\n",attrname, value);
+ return LDAP_OPERATIONS_ERROR;
+ }
+
if ( apply ) {
CFG_LOCK_WRITE(slapdFrontendConfig);
- slapdFrontendConfig->outbound_ldap_io_timeout = atoi( value );
+ slapdFrontendConfig->outbound_ldap_io_timeout = timeout;
CFG_UNLOCK_WRITE(slapdFrontendConfig);
}
return LDAP_SUCCESS;
@@ -7253,7 +7300,7 @@ config_set_connection_buffer( const char *attrname, char *value,
slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig();
if ( config_value_is_null( attrname, value, errorbuf, 0 )) {
- return LDAP_OPERATIONS_ERROR;
+ return LDAP_OPERATIONS_ERROR;
}
if ((strcasecmp(value, "0") != 0) && (strcasecmp(value, "1") != 0) &&
@@ -7265,7 +7312,7 @@ config_set_connection_buffer( const char *attrname, char *value,
}
if ( !apply ) {
- return retVal;
+ return retVal;
}
PR_AtomicSet(&slapdFrontendConfig->connection_buffer, atoi(value));
@@ -7277,13 +7324,23 @@ config_set_listen_backlog_size( const char *attrname, char *value,
char *errorbuf, int apply )
{
slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig();
+ long size;
+ char *endp;
if ( config_value_is_null( attrname, value, errorbuf, 0 )) {
return LDAP_OPERATIONS_ERROR;
}
+ errno = 0;
+ size = strtol(value, &endp, 10);
+ if ( *endp != '\0' || errno == ERANGE){
+ PR_snprintf(errorbuf, SLAPI_DSE_RETURNTEXT_SIZE, "(%s) value (%s) "
+ "is invalid\n",attrname, value);
+ return LDAP_OPERATIONS_ERROR;
+ }
+
if ( apply ) {
- PR_AtomicSet(&slapdFrontendConfig->listen_backlog_size, atoi(value));
+ PR_AtomicSet(&slapdFrontendConfig->listen_backlog_size, size);
}
return LDAP_SUCCESS;
}
9 years, 9 months
dirsrvtests/tickets
by Noriko Hosoi
dirsrvtests/tickets/ticket47824_test.py | 307 ++++++++++++++++++++++++++++++++
1 file changed, 307 insertions(+)
New commits:
commit 8b305c1fb1cb7b42ff59f128cd3cf15a96eb1dab
Author: Noriko Hosoi <nhosoi(a)redhat.com>
Date: Tue Jul 15 11:04:57 2014 -0700
Ticket 47824 - CI test: add test case for ticket 47824
Bug Description: Simple Paged Results search fails to return engries
under the sub suffixes if the search goes across the backend boundaries.
Test Description: Add 3 sub suffixes under the primary suffix.
Run Simple Paged Results search with the page size 4.
Compare the returned entry count with the created data count in assert.
https://fedorahosted.org/389/ticket/47824
Reviewed by mreynolds(a)redhat.com (Thank you, Mark!!)
diff --git a/dirsrvtests/tickets/ticket47824_test.py b/dirsrvtests/tickets/ticket47824_test.py
new file mode 100644
index 0000000..3183967
--- /dev/null
+++ b/dirsrvtests/tickets/ticket47824_test.py
@@ -0,0 +1,307 @@
+import os
+import sys
+import time
+import ldap
+import logging
+import socket
+import time
+import logging
+import pytest
+from lib389 import DirSrv, Entry, tools, tasks
+from lib389.tools import DirSrvTools
+from lib389._constants import *
+from lib389.properties import *
+from lib389.tasks import *
+from constants import *
+from ldap.controls import SimplePagedResultsControl
+
+log = logging.getLogger(__name__)
+
+installation_prefix = None
+
+MYSUFFIX = 'o=ticket47824.org'
+MYSUFFIXBE = 'ticket47824'
+SUBSUFFIX0 = 'ou=OU0,o=ticket47824.org'
+SUBSUFFIX0BE = 'OU0'
+SUBSUFFIX1 = 'ou=OU1,o=ticket47824.org'
+SUBSUFFIX1BE = 'OU1'
+SUBSUFFIX2 = 'ou=OU2,o=ticket47824.org'
+SUBSUFFIX2BE = 'OU2'
+
+_MYLDIF = 'ticket47824.ldif'
+_SUBLDIF0TMP = 'ticket47824_0.tmp'
+_SUBLDIF0 = 'ticket47824_0.ldif'
+_SUBLDIF1TMP = 'ticket47824_1.tmp'
+_SUBLDIF1 = 'ticket47824_1.ldif'
+_SUBLDIF2TMP = 'ticket47824_2.tmp'
+_SUBLDIF2 = 'ticket47824_2.ldif'
+
+SEARCHFILTER = '(objectclass=*)'
+
+class TopologyStandalone(object):
+ def __init__(self, standalone):
+ standalone.open()
+ self.standalone = standalone
+
+
+(a)pytest.fixture(scope="module")
+def topology(request):
+ '''
+ This fixture is used to standalone topology for the 'module'.
+ At the beginning, It may exists a standalone instance.
+ It may also exists a backup for the standalone instance.
+
+ Principle:
+ If standalone instance exists:
+ restart it
+ If backup of standalone exists:
+ create/rebind to standalone
+
+ restore standalone instance from backup
+ else:
+ Cleanup everything
+ remove instance
+ remove backup
+ Create instance
+ Create backup
+ '''
+ global installation_prefix
+
+ if installation_prefix:
+ args_instance[SER_DEPLOYED_DIR] = installation_prefix
+
+ standalone = DirSrv(verbose=False)
+
+ # Args for the standalone instance
+ args_instance[SER_HOST] = HOST_STANDALONE
+ args_instance[SER_PORT] = PORT_STANDALONE
+ args_instance[SER_SERVERID_PROP] = SERVERID_STANDALONE
+ args_standalone = args_instance.copy()
+ standalone.allocate(args_standalone)
+
+ # Get the status of the backups
+ backup_standalone = standalone.checkBackupFS()
+
+ # Get the status of the instance and restart it if it exists
+ instance_standalone = standalone.exists()
+ if instance_standalone:
+ # assuming the instance is already stopped, just wait 5 sec max
+ standalone.stop(timeout=5)
+ standalone.start(timeout=10)
+
+ if backup_standalone:
+ # The backup exist, assuming it is correct
+ # we just re-init the instance with it
+ if not instance_standalone:
+ standalone.create()
+ # Used to retrieve configuration information (dbdir, confdir...)
+ standalone.open()
+
+ # restore standalone instance from backup
+ standalone.stop(timeout=10)
+ standalone.restoreFS(backup_standalone)
+ standalone.start(timeout=10)
+
+ else:
+ # We should be here only in two conditions
+ # - This is the first time a test involve standalone instance
+ # - Something weird happened (instance/backup destroyed)
+ # so we discard everything and recreate all
+
+ # Remove the backup. So even if we have a specific backup file
+ # (e.g backup_standalone) we clear backup that an instance may have created
+ if backup_standalone:
+ standalone.clearBackupFS()
+
+ # Remove the instance
+ if instance_standalone:
+ standalone.delete()
+
+ # Create the instance
+ standalone.create()
+
+ # Used to retrieve configuration information (dbdir, confdir...)
+ standalone.open()
+
+ # Time to create the backups
+ standalone.stop(timeout=10)
+ standalone.backupfile = standalone.backupFS()
+ standalone.start(timeout=10)
+
+ # clear the tmp directory
+ standalone.clearTmpDir(__file__)
+
+ #
+ # Here we have standalone instance up and running
+ # Either coming from a backup recovery
+ # or from a fresh (re)init
+ # Time to return the topology
+ return TopologyStandalone(standalone)
+
+
+def test_ticket47824_run(topology):
+ """
+ Add 3 sub suffixes under the primary suffix
+ Import 16 entries each
+ Search with Simple Paged Results Control from the primary suffix (pagesize = 4)
+ If all of them are returned, the bug is verified
+ """
+ log.info('Testing Ticket 47824 - paged results control is not working in some cases when we have a subsuffix')
+
+ # bind as directory manager
+ topology.standalone.log.info("Bind as %s" % DN_DM)
+ topology.standalone.simple_bind_s(DN_DM, PASSWORD)
+
+ topology.standalone.log.info("\n\n######################### SETUP SUFFIX o=ticket47824.org ######################\n")
+
+ topology.standalone.backend.create(MYSUFFIX, {BACKEND_NAME: MYSUFFIXBE})
+ topology.standalone.mappingtree.create(MYSUFFIX, bename=MYSUFFIXBE)
+
+ topology.standalone.log.info("\n\n######################### SETUP SUB SUFFIX ou=OU0 ######################\n")
+
+ topology.standalone.backend.create(SUBSUFFIX0, {BACKEND_NAME: SUBSUFFIX0BE})
+ topology.standalone.mappingtree.create(SUBSUFFIX0, bename=SUBSUFFIX0BE, parent=MYSUFFIX)
+
+ topology.standalone.log.info("\n\n######################### SETUP SUB SUFFIX ou=OU1 ######################\n")
+
+ topology.standalone.backend.create(SUBSUFFIX1, {BACKEND_NAME: SUBSUFFIX1BE})
+ topology.standalone.mappingtree.create(SUBSUFFIX1, bename=SUBSUFFIX1BE, parent=MYSUFFIX)
+
+ topology.standalone.log.info("\n\n######################### SETUP SUB SUFFIX ou=OU2 ######################\n")
+
+ topology.standalone.backend.create(SUBSUFFIX2, {BACKEND_NAME: SUBSUFFIX2BE})
+ topology.standalone.mappingtree.create(SUBSUFFIX2, bename=SUBSUFFIX2BE, parent=MYSUFFIX)
+
+ topology.standalone.log.info("\n\n######################### Generate Test data ######################\n")
+
+ # get tmp dir
+ mytmp = topology.standalone.getDir(__file__, TMP_DIR)
+ if mytmp == None:
+ mytmp = "/tmp"
+
+ MYLDIF = '%s%s' % (mytmp, _MYLDIF)
+ SUBLDIF0TMP = '%s%s' % (mytmp, _SUBLDIF0TMP)
+ SUBLDIF0 = '%s%s' % (mytmp, _SUBLDIF0)
+ SUBLDIF1TMP = '%s%s' % (mytmp, _SUBLDIF1TMP)
+ SUBLDIF1 = '%s%s' % (mytmp, _SUBLDIF1)
+ SUBLDIF2TMP = '%s%s' % (mytmp, _SUBLDIF2TMP)
+ SUBLDIF2 = '%s%s' % (mytmp, _SUBLDIF2)
+
+ os.system('ls %s' % MYLDIF)
+ os.system('ls %s' % SUBLDIF0TMP)
+ os.system('ls %s' % SUBLDIF1TMP)
+ os.system('ls %s' % SUBLDIF2TMP)
+ os.system('rm -f %s' % MYLDIF)
+ os.system('rm -f %s' % SUBLDIF0TMP)
+ os.system('rm -f %s' % SUBLDIF1TMP)
+ os.system('rm -f %s' % SUBLDIF2TMP)
+ os.system('dbgen.pl -s %s -o %s -n 10' % (MYSUFFIX, MYLDIF))
+ os.system('dbgen.pl -s %s -o %s -n 10' % (SUBSUFFIX0, SUBLDIF0TMP))
+ os.system('dbgen.pl -s %s -o %s -n 10' % (SUBSUFFIX1, SUBLDIF1TMP))
+ os.system('dbgen.pl -s %s -o %s -n 10' % (SUBSUFFIX2, SUBLDIF2TMP))
+
+ os.system('cat %s | sed -e "s/\<objectClass: organization\>/objectClass: organizationalUnit/" | sed -e "/^o:.*/d" > %s' % (SUBLDIF0TMP, SUBLDIF0))
+ os.system('cat %s | sed -e "s/\<objectClass: organization\>/objectClass: organizationalUnit/" | sed -e "/^o:.*/d" > %s' % (SUBLDIF1TMP, SUBLDIF1))
+ os.system('cat %s | sed -e "s/\<objectClass: organization\>/objectClass: organizationalUnit/" | sed -e "/^o:.*/d" > %s' % (SUBLDIF2TMP, SUBLDIF2))
+
+ cmdline = 'egrep dn: %s %s %s %s | wc -l' % (MYLDIF, SUBLDIF0, SUBLDIF1, SUBLDIF2)
+ p = os.popen(cmdline, "r")
+ dnnumstr = p.readline()
+ dnnum = int(dnnumstr)
+ topology.standalone.log.info("We have %d entries.\n", dnnum)
+
+ topology.standalone.log.info("\n\n######################### Import Test data ######################\n")
+
+ args = {TASK_WAIT: True}
+ importTask = Tasks(topology.standalone)
+ importTask.importLDIF(MYSUFFIX, MYSUFFIXBE, MYLDIF, args)
+ importTask.importLDIF(SUBSUFFIX0, SUBSUFFIX0BE, SUBLDIF0, args)
+ importTask.importLDIF(SUBSUFFIX1, SUBSUFFIX1BE, SUBLDIF1, args)
+ importTask.importLDIF(SUBSUFFIX2, SUBSUFFIX2BE, SUBLDIF2, args)
+
+ topology.standalone.log.info("\n\n######################### SEARCH ALL ######################\n")
+ topology.standalone.log.info("Bind as %s and add the READ/SEARCH SELFDN aci" % DN_DM)
+ topology.standalone.simple_bind_s(DN_DM, PASSWORD)
+
+ entries = topology.standalone.search_s(MYSUFFIX, ldap.SCOPE_SUBTREE, SEARCHFILTER)
+ topology.standalone.log.info("Returned %d entries.\n", len(entries))
+
+ #print entries
+
+ assert dnnum == len(entries)
+
+ topology.standalone.log.info('%d entries are successfully imported.' % dnnum)
+
+ topology.standalone.log.info("\n\n######################### SEARCH WITH SIMPLE PAGED RESULTS CONTROL ######################\n")
+
+ page_size = 4
+ req_ctrl = SimplePagedResultsControl(True, size=page_size, cookie='')
+
+ known_ldap_resp_ctrls = {
+ SimplePagedResultsControl.controlType:SimplePagedResultsControl,
+ }
+
+ topology.standalone.log.info("Calling search_ext...")
+ msgid = topology.standalone.search_ext(MYSUFFIX, ldap.SCOPE_SUBTREE, SEARCHFILTER, None, serverctrls=[req_ctrl])
+
+ pageddncnt = 0
+ pages = 0
+ while True:
+ pages += 1
+
+ topology.standalone.log.info("Getting page %d" % pages)
+ rtype, rdata, rmsgid, serverctrls = topology.standalone.result3(msgid, resp_ctrl_classes=known_ldap_resp_ctrls)
+ topology.standalone.log.info("%d results" % len(rdata))
+ pageddncnt += len(rdata)
+
+ topology.standalone.log.info("Results:")
+ for dn, attrs in rdata:
+ topology.standalone.log.info("dn: %s" % dn)
+
+ pctrls = [
+ c for c in serverctrls if c.controlType == SimplePagedResultsControl.controlType
+ ]
+ if not pctrls:
+ topology.standalone.log.info('Warning: Server ignores RFC 2696 control.')
+ break
+
+ if pctrls[0].cookie:
+ req_ctrl.cookie = pctrls[0].cookie
+ topology.standalone.log.info("cookie: %s" % req_ctrl.cookie)
+ msgid = topology.standalone.search_ext(MYSUFFIX,
+ ldap.SCOPE_SUBTREE,
+ SEARCHFILTER,
+ None,
+ serverctrls=[req_ctrl])
+ else:
+ topology.standalone.log.info("No cookie")
+ break
+
+ topology.standalone.log.info("Paged result search returned %d entries.\n", pageddncnt)
+
+ assert dnnum == len(entries)
+ topology.standalone.log.info("ticket47824 was successfully verified.");
+
+def test_ticket47824_final(topology):
+ topology.standalone.stop(timeout=10)
+
+def run_isolated():
+ '''
+ run_isolated is used to run these test cases independently of a test scheduler (xunit, py.test..)
+ To run isolated without py.test, you need to
+ - edit this file and comment '@pytest.fixture' line before 'topology' function.
+ - set the installation prefix
+ - run this program
+ '''
+ global installation_prefix
+ installation_prefix = None
+
+ topo = topology(True)
+ test_ticket47824_run(topo)
+
+ test_ticket47824_final(topo)
+
+
+if __name__ == '__main__':
+ run_isolated()
+
9 years, 9 months
ldap/servers
by Noriko Hosoi
ldap/servers/slapd/opshared.c | 17 ++++++++++-------
ldap/servers/slapd/pagedresults.c | 5 +++++
2 files changed, 15 insertions(+), 7 deletions(-)
New commits:
commit b116d7e2a7a8e7443be93ecb84efee1364b6ba86
Author: Noriko Hosoi <nhosoi(a)redhat.com>
Date: Tue Jul 8 17:40:00 2014 -0700
Ticket #47824 - paged results control is not working in some cases when we have a subsuffix.
Bug Description: When a simple paged result search is run against
multiple backends, subsuffix backends were not correctly set to the
next loop when crossing the backend boundary.
Fix Description: This patch changes the logic to detect the page
search finished and set the next backend correctly to the paged-
results handle. Also, when reusing the paged result handle in
pagedresults_parse_control_value, increment the refcnt.
https://fedorahosted.org/389/ticket/47824
Reviewed by mreynolds(a)redhat.com (Thank you, Mark!!)
diff --git a/ldap/servers/slapd/opshared.c b/ldap/servers/slapd/opshared.c
index 3fb23fa..e222b05 100644
--- a/ldap/servers/slapd/opshared.c
+++ b/ldap/servers/slapd/opshared.c
@@ -510,7 +510,6 @@ op_shared_search (Slapi_PBlock *pb, int send_result)
err_code = slapi_mapping_tree_select_all(pb, be_list, referral_list, errorbuf);
if (((err_code != LDAP_SUCCESS) && (err_code != LDAP_OPERATIONS_ERROR) && (err_code != LDAP_REFERRAL))
|| ((err_code == LDAP_OPERATIONS_ERROR) && (be_list[0] == NULL)))
-
{
send_ldap_result(pb, err_code, NULL, errorbuf, 0, NULL);
rc = -1;
@@ -713,10 +712,6 @@ op_shared_search (Slapi_PBlock *pb, int send_result)
curr_search_count = -1;
} else {
curr_search_count = pnentries;
- /* no more entries, but at least another backend */
- if (pagedresults_set_current_be(pb->pb_conn, next_be, pr_idx) < 0) {
- goto free_and_return;
- }
}
estimate = 0;
} else {
@@ -731,12 +726,20 @@ op_shared_search (Slapi_PBlock *pb, int send_result)
pagedresults_set_search_result_set_size_estimate(pb->pb_conn,
operation,
estimate, pr_idx);
- next_be = NULL; /* to break the loop */
- if (curr_search_count == -1) {
+ if (PAGEDRESULTS_SEARCH_END == pr_stat) {
pagedresults_lock(pb->pb_conn, pr_idx);
slapi_pblock_set(pb, SLAPI_SEARCH_RESULT_SET, NULL);
pagedresults_free_one(pb->pb_conn, operation, pr_idx);
pagedresults_unlock(pb->pb_conn, pr_idx);
+ if (next_be) {
+ /* no more entries, but at least another backend */
+ if (pagedresults_set_current_be(pb->pb_conn, next_be, pr_idx) < 0) {
+ goto free_and_return;
+ }
+ }
+ next_be = NULL; /* to break the loop */
+ } else if (PAGEDRESULTS_PAGE_END == pr_stat) {
+ next_be = NULL; /* to break the loop */
}
} else {
/* be_suffix null means that we are searching the default backend
diff --git a/ldap/servers/slapd/pagedresults.c b/ldap/servers/slapd/pagedresults.c
index edd76c6..d589708 100644
--- a/ldap/servers/slapd/pagedresults.c
+++ b/ldap/servers/slapd/pagedresults.c
@@ -136,6 +136,7 @@ pagedresults_parse_control_value( Slapi_PBlock *pb,
}
conn->c_pagedresults.prl_count++;
} else {
+ PagedResults *prp = NULL;
/* Repeated paged results request.
* PagedResults is already allocated. */
char *ptr = slapi_ch_malloc(cookie.bv_len + 1);
@@ -143,6 +144,10 @@ pagedresults_parse_control_value( Slapi_PBlock *pb,
*(ptr+cookie.bv_len) = '\0';
*index = strtol(ptr, NULL, 10);
slapi_ch_free_string(&ptr);
+ prp = conn->c_pagedresults.prl_list + *index;
+ if (!(prp->pr_search_result_set)) { /* freed and reused for the next backend. */
+ conn->c_pagedresults.prl_count++;
+ }
}
/* reset sizelimit */
op->o_pagedresults_sizelimit = -1;
9 years, 9 months
ldap/servers
by Mark Reynolds
ldap/servers/plugins/replication/repl5_replica.c | 21 +++++++++++++--------
ldap/servers/slapd/entry.c | 12 +++++++++++-
ldap/servers/slapd/slapi-plugin.h | 10 ++++++++++
3 files changed, 34 insertions(+), 9 deletions(-)
New commits:
commit eb5fde9fec8aae02dc585d0fec24ba9140025bc7
Author: Mark Reynolds <mreynolds(a)redhat.com>
Date: Tue Jul 15 12:34:02 2014 -0400
Ticket 47710 - Missing warning for invalid replica backoff configuration
Bug Description: If you manaully edit the dse.ldif and set the minimum or
maximum backoff time to zero, a warning/error is not given.
At server startup the server thinks zero means the attribute
is not set, and then sets it to the default value without
logging a message.
Fix Description: Properly check if the attribute is present, and log an error
accordingly.
https://fedorahosted.org/389/ticket/47710
Jenkins: passed
Reviewed by: nhosoi(Thanks!)
diff --git a/ldap/servers/plugins/replication/repl5_replica.c b/ldap/servers/plugins/replication/repl5_replica.c
index b6e7be0..dab1c4e 100644
--- a/ldap/servers/plugins/replication/repl5_replica.c
+++ b/ldap/servers/plugins/replication/repl5_replica.c
@@ -1839,23 +1839,28 @@ _replica_init_from_config (Replica *r, Slapi_Entry *e, char *errortext)
}
/* grab and validate the backoff retry settings */
- backoff_min = slapi_entry_attr_get_int(e, type_replicaBackoffMin);
- if(backoff_min <= 0){
- if (backoff_min != 0){
+ if(slapi_entry_attr_exists(e, type_replicaBackoffMin)){
+ backoff_min = slapi_entry_attr_get_int(e, type_replicaBackoffMin);
+ if(backoff_min <= 0){
slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "Invalid value for %s: %d Using default value (%d)\n",
- type_replicaBackoffMin, backoff_min, PROTOCOL_BACKOFF_MINIMUM );
+ type_replicaBackoffMin, backoff_min, PROTOCOL_BACKOFF_MINIMUM );
+ backoff_min = PROTOCOL_BACKOFF_MINIMUM;
}
+ } else {
backoff_min = PROTOCOL_BACKOFF_MINIMUM;
}
- backoff_max = slapi_entry_attr_get_int(e, type_replicaBackoffMax);
- if(backoff_max <= 0){
- if(backoff_max != 0) {
+ if(slapi_entry_attr_exists(e, type_replicaBackoffMax)){
+ backoff_max = slapi_entry_attr_get_int(e, type_replicaBackoffMax);
+ if(backoff_max <= 0){
slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "Invalid value for %s: %d Using default value (%d)\n",
- type_replicaBackoffMax, backoff_max, PROTOCOL_BACKOFF_MAXIMUM );
+ type_replicaBackoffMax, backoff_max, PROTOCOL_BACKOFF_MAXIMUM );
+ backoff_max = PROTOCOL_BACKOFF_MAXIMUM;
}
+ } else {
backoff_max = PROTOCOL_BACKOFF_MAXIMUM;
}
+
if(backoff_min > backoff_max){
/* Ok these values are invalid, reset back the defaults */
slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "Backoff minimum (%d) can not be greater than "
diff --git a/ldap/servers/slapd/entry.c b/ldap/servers/slapd/entry.c
index 25549a7..718d78a 100644
--- a/ldap/servers/slapd/entry.c
+++ b/ldap/servers/slapd/entry.c
@@ -3123,11 +3123,21 @@ slapi_entry_attr_set_ulong( Slapi_Entry* e, const char *type, unsigned long l)
slapi_entry_attr_replace( e, type, bvals );
}
+int
+slapi_entry_attr_exists(Slapi_Entry *e, const char *type)
+{
+ Slapi_Attr *attr;
+
+ if(slapi_entry_attr_find(e, type, &attr) == 0){
+ return 1;
+ }
+ return 0;
+}
+
/* JCM: The strcasecmp below should really be a bervalcmp
* deprecatred in favour of slapi_entry_attr_has_syntax_value
* which does respect the syntax of the attribute type.
*/
-
SLAPI_DEPRECATED int
slapi_entry_attr_hasvalue(const Slapi_Entry *e, const char *type, const char *value) /* JCM - (const char *) => (struct berval *) */
{
diff --git a/ldap/servers/slapd/slapi-plugin.h b/ldap/servers/slapd/slapi-plugin.h
index cd17907..b803f91 100644
--- a/ldap/servers/slapd/slapi-plugin.h
+++ b/ldap/servers/slapd/slapi-plugin.h
@@ -1983,6 +1983,16 @@ void slapi_entry_attr_set_longlong( Slapi_Entry* e, const char *type, long long
void slapi_entry_attr_set_ulong(Slapi_Entry* e, const char *type, unsigned long l);
/**
+ * Check if an attribute is set in the entry
+ *
+ * \param e Entry that you want to check.
+ * \param type Attribute type that you want to test for the value specified.
+ * \return 1 if attribute is present in the entry
+ * \return 0 if the attribute is not present in the entry.
+ */
+int slapi_entry_attr_exists(Slapi_Entry *e, const char *type);
+
+/**
* Determines if an attribute in an entry contains a specified value.
*
* The syntax of the attribute type is taken into account when checking
9 years, 9 months
ldap/servers
by Mark Reynolds
ldap/servers/plugins/memberof/memberof.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
New commits:
commit 068ee18c9f18f198bbef4ca19c26913478d0d19d
Author: Mark Reynolds <mreynolds(a)redhat.com>
Date: Tue Jul 15 12:28:18 2014 -0400
Ticket 437853 - Missing newline at end of the error log messages in memberof
Description: Add missing newlines characters at the end of error messages.
https://fedorahosted.org/389/ticket/47853
Reviewed by: mreynolds
diff --git a/ldap/servers/plugins/memberof/memberof.c b/ldap/servers/plugins/memberof/memberof.c
index 526e95f..6549718 100644
--- a/ldap/servers/plugins/memberof/memberof.c
+++ b/ldap/servers/plugins/memberof/memberof.c
@@ -558,7 +558,7 @@ int memberof_postop_del(Slapi_PBlock *pb)
*/
if((ret = memberof_del_dn_from_groups(pb, &configCopy, sdn))){
slapi_log_error(SLAPI_LOG_FATAL, MEMBEROF_PLUGIN_SUBSYSTEM,
- "memberof_postop_del: error deleting dn (%s) from group. Error (%d)",
+ "memberof_postop_del: error deleting dn (%s) from group. Error (%d)\n",
slapi_sdn_get_dn(sdn),ret);
memberof_unlock();
memberof_free_config(&configCopy);
@@ -578,7 +578,7 @@ int memberof_postop_del(Slapi_PBlock *pb)
{
if((ret = memberof_del_attr_list(pb, &configCopy, sdn, attr))){
slapi_log_error( SLAPI_LOG_FATAL, MEMBEROF_PLUGIN_SUBSYSTEM,
- "memberof_postop_del: error deleting attr list - dn (%s). Error (%d)",
+ "memberof_postop_del: error deleting attr list - dn (%s). Error (%d)\n",
slapi_sdn_get_dn(sdn),ret);
}
@@ -1282,7 +1282,7 @@ int memberof_postop_add(Slapi_PBlock *pb)
{
if((ret = memberof_add_attr_list(pb, &configCopy, sdn, attr))){
slapi_log_error( SLAPI_LOG_FATAL, MEMBEROF_PLUGIN_SUBSYSTEM,
- "memberof_postop_add: failed to add dn(%s), error (%d)",
+ "memberof_postop_add: failed to add dn(%s), error (%d)\n",
slapi_sdn_get_dn(sdn), ret);
break;
}
9 years, 9 months
ldap/servers
by Mark Reynolds
ldap/servers/plugins/memberof/memberof.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
New commits:
commit 41f984ca92fe3d3d9f5297ff0c89f546749a322b
Author: Mark Reynolds <mreynolds(a)redhat.com>
Date: Tue Jul 15 10:46:09 2014 -0400
Ticket 47853 - client hangs in add if memberof fails
Bug Description: If memberof plugin is enabled and the client adds an
entry with a membership attr it hangs if the memberof_postop_add
rejects the operation.
Fix Description: The problem is due to an unexpected error code being set
in the pblock (-1). Setting the proper LDAP error code
resolves the hang.
https://fedorahosted.org/389/ticket/47853
Reviewed by: lkrispenz(Thanks!)
diff --git a/ldap/servers/plugins/memberof/memberof.c b/ldap/servers/plugins/memberof/memberof.c
index 8257e9d..526e95f 100644
--- a/ldap/servers/plugins/memberof/memberof.c
+++ b/ldap/servers/plugins/memberof/memberof.c
@@ -1604,9 +1604,8 @@ memberof_modop_one_replace_r(Slapi_PBlock *pb, MemberOfConfig *config,
slapi_entry_attr_find( e, config->groupattrs[i], &members );
if(members)
{
- if(memberof_mod_attr_list_r(pb, config, mod_op, group_sdn,
- op_this_sdn, members, ll) != 0){
- rc = -1;
+ if((rc = memberof_mod_attr_list_r(pb, config, mod_op, group_sdn,
+ op_this_sdn, members, ll)) != 0){
goto bail;
}
}
9 years, 9 months
ldap/servers
by Noriko Hosoi
ldap/servers/slapd/back-ldbm/dblayer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 238d8fea48787f8693798447b566e44478fbae0c
Author: Noriko Hosoi <nhosoi(a)redhat.com>
Date: Mon Jul 14 18:11:00 2014 -0700
Ticket #47746 - ldap/servers/slapd/back-ldbm/dblayer.c: possible minor problem with sscanf
Description: Warning in read_metadata (dblayer.c):
> sscanf(thisline,"%[a-z]%c%s",attribute,&delimiter,value);
(warning) scanf without field width limits can crash with huge input data.
Adding the size of the buffer to the sscanf format.
Thanks to dcb for reporting the bug and fix.
Reviewed by nhosoi(a)redhat.com.
diff --git a/ldap/servers/slapd/back-ldbm/dblayer.c b/ldap/servers/slapd/back-ldbm/dblayer.c
index 4f38845..f3159a9 100644
--- a/ldap/servers/slapd/back-ldbm/dblayer.c
+++ b/ldap/servers/slapd/back-ldbm/dblayer.c
@@ -5302,7 +5302,7 @@ static int read_metadata(struct ldbminfo *li)
nextline++;
}
}
- sscanf(thisline,"%[a-z]%c%s",attribute,&delimiter,value);
+ sscanf(thisline,"%512[a-z]%c%128s",attribute,&delimiter,value);
if (0 == strcmp("cachesize",attribute)) {
priv->dblayer_previous_cachesize = strtoul(value, NULL, 10);
} else if (0 == strcmp("ncache",attribute)) {
9 years, 9 months
ldap/servers man/man1
by Noriko Hosoi
ldap/servers/slapd/tools/rsearch/scripts/dbgen.pl.in | 4 ++--
man/man1/dbgen.pl.1 | 6 ++++++
2 files changed, 8 insertions(+), 2 deletions(-)
New commits:
commit 9df74aadfa731138317f9797ff58f44b7f380e47
Author: Noriko Hosoi <nhosoi(a)redhat.com>
Date: Mon Jul 14 17:20:32 2014 -0700
Ticket #47711 - improve dbgen rdn generation, output and man page.
Description:
dbgen.pl usage: "old" is replaced with "new".
old: "-j 0 pad numbers used in RDN to this many digits e.g. with 4 1 becomes 0001"
new: "-j 0 pad numbers used in RDN to this many digits e.g. with 4 1 becomes 0001 (ignored unless -b is specified)"
old: "-b beginning number for RDN (default 1 - ending number is -n value)"
new: "-b beginning number for RDN (ending number is -n value + beginning number)"
dbgen.pl man page: following options are added.
-b number
Beginning number for RDN e.g. uid=1
(ending number is -n value + beginning number)
-j number
0 pad numbers used in RDN to this many digits e.g. with 4 1 becomes 0001
(ignored unless -b number is specified)
https://fedorahosted.org/389/ticket/47711
Reviewed by rmeggins(a)redhat.com (Thanks, Rich!)
diff --git a/ldap/servers/slapd/tools/rsearch/scripts/dbgen.pl.in b/ldap/servers/slapd/tools/rsearch/scripts/dbgen.pl.in
index 2ef76f2..ddd21cc 100755
--- a/ldap/servers/slapd/tools/rsearch/scripts/dbgen.pl.in
+++ b/ldap/servers/slapd/tools/rsearch/scripts/dbgen.pl.in
@@ -65,10 +65,10 @@ sub PrintUsage {
"\t -s suffix, default is 'dc=example,dc=com'\n",
"\t -c for CN naming style RDN's : default is UID\n",
"\t -z extra objectclasses to add to base used in -O - should be AUXILIARY or SUB\n",
- "\t -j 0 pad numbers used in RDN to this many digits e.g. with 4 1 becomes 0001\n",
+ "\t -j 0 pad numbers used in RDN to this many digits e.g. with 4 1 becomes 0001 (ignored unless -b is specified)\n",
"\t -m naming attribute for RDN\n",
"\t -n number of entries to generate\n",
- "\t -b beginning number for RDN (default 1 - ending number is -n value)\n",
+ "\t -b beginning number for RDN (ending number is -n value + beginning number)\n",
"\t -p for organizationalPersons, default is inetOrgPerson\n",
"\t -r seed---seed number for random number generator\n",
"\t -g print extra entries for orgchart\n",
diff --git a/man/man1/dbgen.pl.1 b/man/man1/dbgen.pl.1
index efebb84..0c3dfd8 100644
--- a/man/man1/dbgen.pl.1
+++ b/man/man1/dbgen.pl.1
@@ -65,6 +65,12 @@ Location of directory containing data files, default is /usr/share/dirsrv/data
.TP
.B \-n number
Number of entries to be generated
+.TP
+.B \-b number
+Beginning number for RDN e.g. uid=1 (ending number is \-n value + beginning number)
+.TP
+.B \-j number
+0 pad numbers used in RDN to this many digits e.g. with 4 1 becomes 0001 (ignored unless \-b number is specified)
.br
.SH AUTHOR
dbgen.pl was written by the 389 Project.
9 years, 9 months
dirsrvtests/tickets
by Mark Reynolds
dirsrvtests/tickets/ticket47490_test.py | 2 +-
dirsrvtests/tickets/ticket47553_single_aci_test.py | 2 +-
dirsrvtests/tickets/ticket47573_test.py | 2 +-
dirsrvtests/tickets/ticket47619_test.py | 2 +-
dirsrvtests/tickets/ticket47653MMR_test.py | 2 +-
dirsrvtests/tickets/ticket47676_test.py | 2 +-
dirsrvtests/tickets/ticket47721_test.py | 2 +-
dirsrvtests/tickets/ticket47787_test.py | 2 +-
8 files changed, 8 insertions(+), 8 deletions(-)
New commits:
commit b218ad7e5adfc602a7ca4583ea8b5bd91a950623
Author: Mark Reynolds <mreynolds(a)redhat.com>
Date: Mon Jul 14 17:13:07 2014 -0400
Ticket 47855 - Fix previous commit
Description: Incorrectly used "standalone" when claering the tmp directory.
Not all the tickets use the standalone name for the instance object.
https://fedorahosted.org/389/ticket/47855
Jenkins: passed
Reviewed by: nhosoi(Thanks!)
diff --git a/dirsrvtests/tickets/ticket47490_test.py b/dirsrvtests/tickets/ticket47490_test.py
index 51511b9..1f37d6c 100644
--- a/dirsrvtests/tickets/ticket47490_test.py
+++ b/dirsrvtests/tickets/ticket47490_test.py
@@ -274,7 +274,7 @@ def topology(request):
consumer.start(timeout=10)
# clear the tmp directory
- standalone.clearTmpDir(__file__)
+ master.clearTmpDir(__file__)
#
# Here we have two instances master and consumer
diff --git a/dirsrvtests/tickets/ticket47553_single_aci_test.py b/dirsrvtests/tickets/ticket47553_single_aci_test.py
index 5911044..4be2470 100644
--- a/dirsrvtests/tickets/ticket47553_single_aci_test.py
+++ b/dirsrvtests/tickets/ticket47553_single_aci_test.py
@@ -236,7 +236,7 @@ def topology(request):
master2.start(timeout=10)
# clear the tmp directory
- standalone.clearTmpDir(__file__)
+ master1.clearTmpDir(__file__)
#
# Here we have two instances master and consumer
diff --git a/dirsrvtests/tickets/ticket47573_test.py b/dirsrvtests/tickets/ticket47573_test.py
index 8922426..356873d 100644
--- a/dirsrvtests/tickets/ticket47573_test.py
+++ b/dirsrvtests/tickets/ticket47573_test.py
@@ -275,7 +275,7 @@ def topology(request):
consumer.start(timeout=10)
# clear the tmp directory
- standalone.clearTmpDir(__file__)
+ master.clearTmpDir(__file__)
#
# Here we have two instances master and consumer
diff --git a/dirsrvtests/tickets/ticket47619_test.py b/dirsrvtests/tickets/ticket47619_test.py
index 945f68a..af391ce 100644
--- a/dirsrvtests/tickets/ticket47619_test.py
+++ b/dirsrvtests/tickets/ticket47619_test.py
@@ -205,7 +205,7 @@ def topology(request):
consumer.start(timeout=10)
# clear the tmp directory
- standalone.clearTmpDir(__file__)
+ master.clearTmpDir(__file__)
#
# Here we have two instances master and consumer
diff --git a/dirsrvtests/tickets/ticket47653MMR_test.py b/dirsrvtests/tickets/ticket47653MMR_test.py
index 5a3f095..bce69c8 100644
--- a/dirsrvtests/tickets/ticket47653MMR_test.py
+++ b/dirsrvtests/tickets/ticket47653MMR_test.py
@@ -239,7 +239,7 @@ def topology(request):
master2.start(timeout=10)
# clear the tmp directory
- standalone.clearTmpDir(__file__)
+ master1.clearTmpDir(__file__)
#
# Here we have two instances master and consumer
diff --git a/dirsrvtests/tickets/ticket47676_test.py b/dirsrvtests/tickets/ticket47676_test.py
index be7e626..b462fc2 100644
--- a/dirsrvtests/tickets/ticket47676_test.py
+++ b/dirsrvtests/tickets/ticket47676_test.py
@@ -251,7 +251,7 @@ def topology(request):
master2.start(timeout=10)
# clear the tmp directory
- standalone.clearTmpDir(__file__)
+ master1.clearTmpDir(__file__)
#
# Here we have two instances master and consumer
diff --git a/dirsrvtests/tickets/ticket47721_test.py b/dirsrvtests/tickets/ticket47721_test.py
index 955d4bc..e27a5a8 100644
--- a/dirsrvtests/tickets/ticket47721_test.py
+++ b/dirsrvtests/tickets/ticket47721_test.py
@@ -257,7 +257,7 @@ def topology(request):
master2.start(timeout=10)
# clear the tmp directory
- standalone.clearTmpDir(__file__)
+ master1.clearTmpDir(__file__)
#
# Here we have two instances master and consumer
diff --git a/dirsrvtests/tickets/ticket47787_test.py b/dirsrvtests/tickets/ticket47787_test.py
index ecb008c..81d5324 100644
--- a/dirsrvtests/tickets/ticket47787_test.py
+++ b/dirsrvtests/tickets/ticket47787_test.py
@@ -239,7 +239,7 @@ def topology(request):
master2.start(timeout=10)
# clear the tmp directory
- standalone.clearTmpDir(__file__)
+ master1.clearTmpDir(__file__)
#
# Here we have two instances master and consumer
9 years, 9 months
ldap/servers
by Noriko Hosoi
ldap/servers/plugins/uiduniq/uid.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 42fa2e668587efdac38cc7bbc68e059f92a3124c
Author: Noriko Hosoi <nhosoi(a)redhat.com>
Date: Mon Jul 14 14:28:19 2014 -0700
Ticket #47859 - Coverity: 12692 & 12717
12717 - Resource leak - servers/plugins/uiduniq/uid.c
Description: fixing a compiler error introduced by
commit 03f85ec06f6011e1573980e87319af2043e03948
diff --git a/ldap/servers/plugins/uiduniq/uid.c b/ldap/servers/plugins/uiduniq/uid.c
index d1a1700..07ff0ec 100644
--- a/ldap/servers/plugins/uiduniq/uid.c
+++ b/ldap/servers/plugins/uiduniq/uid.c
@@ -225,7 +225,7 @@ uniqueness_entry_to_config(Slapi_PBlock *pb, Slapi_Entry *config_entry)
if (values) {
for (i = 0; values && values[i]; i++);
/* slapi_ch_calloc never returns NULL unless the 2 args are 0 or negative. */
- tmp_config->subtrees = (Slapi_DN **) slapi_ch_calloc(i + 1, sizeof (Slapi_DN *)));
+ tmp_config->subtrees = (Slapi_DN **) slapi_ch_calloc(i + 1, sizeof (Slapi_DN *));
/* copy the valid subtree DN into the config */
for (i = 0, nb_subtrees = 0; values && values[i]; i++) {
if (slapi_dn_syntax_check(pb, values[i], 1)) { /* syntax check failed */
9 years, 9 months