This is an automated email from the git hooks/post-receive script.
mreynolds pushed a change to branch 389-ds-base-1.3.4 in repository 389-ds-base.
from 75cde2c Issue 49122 - Filtered nsrole that uses nsrole crashes the server new 8a758af Issue 49158 - fix latest coverity issues
The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference.
Summary of changes: dirsrvtests/tests/tickets/ticket48005_test.py | 2 +- ldap/servers/plugins/chainingdb/cb_search.c | 13 ++++--------- ldap/servers/plugins/memberof/memberof.c | 14 +++++++------- ldap/servers/plugins/replication/cl5_clcache.c | 4 ++-- 4 files changed, 14 insertions(+), 19 deletions(-)
This is an automated email from the git hooks/post-receive script.
mreynolds pushed a commit to branch 389-ds-base-1.3.4 in repository 389-ds-base.
commit 8a758afe55314ec7911a2df9a8c470a98c9657cb Author: Mark Reynolds mreynolds@redhat.com Date: Tue Mar 7 15:26:39 2017 -0500
Issue 49158 - fix latest coverity issues
14094 - dereference after null check in cl_cache.c 13685 - dereference before null check in cb_search.c 13680 - Explicit null dereferenced in memberof.c 13682 - Bad use of null-like value in ticket48005_test.py
https://pagure.io/389-ds-base/issue/49158
Reviewed by: nhosoi & firstyear (Thanks!!)
(cherry picked from commit f77e77779aea54bc0fe068974e1dd130ea7e1891) (cherry picked from commit d8338ef8d18862295152b1c35bb7898146b169df) --- dirsrvtests/tests/tickets/ticket48005_test.py | 2 +- ldap/servers/plugins/chainingdb/cb_search.c | 13 ++++--------- ldap/servers/plugins/memberof/memberof.c | 14 +++++++------- ldap/servers/plugins/replication/cl5_clcache.c | 4 ++-- 4 files changed, 14 insertions(+), 19 deletions(-)
diff --git a/dirsrvtests/tests/tickets/ticket48005_test.py b/dirsrvtests/tests/tickets/ticket48005_test.py index b2a93e1..4efcfe9 100644 --- a/dirsrvtests/tests/tickets/ticket48005_test.py +++ b/dirsrvtests/tests/tickets/ticket48005_test.py @@ -93,7 +93,7 @@ def test_ticket48005_setup(topology): if hasattr(topology.standalone, 'prefix'): prefix = topology.standalone.prefix else: - prefix = None + prefix = "" dbgen_prog = prefix + '/bin/dbgen.pl' log.info('dbgen_prog: %s' % dbgen_prog) os.system('%s -s %s -o %s -u -n 10000' % (dbgen_prog, SUFFIX, ldif_file)) diff --git a/ldap/servers/plugins/chainingdb/cb_search.c b/ldap/servers/plugins/chainingdb/cb_search.c index d4ddf3c..ab6544f 100644 --- a/ldap/servers/plugins/chainingdb/cb_search.c +++ b/ldap/servers/plugins/chainingdb/cb_search.c @@ -626,11 +626,9 @@ chainingdb_next_search_entry ( Slapi_PBlock *pb ) }
/* - ** build a dummy entry on the fly with a ref attribute - */ - + * build a dummy entry on the fly with a ref attribute + */ { - struct berval bv; int i; struct berval *bvals[2]; @@ -644,7 +642,7 @@ chainingdb_next_search_entry ( Slapi_PBlock *pb ) bv.bv_len=strlen(bv.bv_val); slapi_entry_add_values( anEntry, "objectclass", bvals);
- for (i=0;referrals[i] != NULL; i++) { + for (i=0; referrals && referrals[i] != NULL; i++) { bv.bv_val=referrals[i]; bv.bv_len=strlen(bv.bv_val); slapi_entry_add_values( anEntry, "ref", bvals); @@ -654,10 +652,7 @@ chainingdb_next_search_entry ( Slapi_PBlock *pb ) slapi_pblock_set( pb, SLAPI_SEARCH_RESULT_ENTRY,anEntry); cb_set_acl_policy(pb); } - - if (referrals != NULL) { - slapi_ldap_value_free( referrals ); - } + slapi_ldap_value_free( referrals ); return 0;
diff --git a/ldap/servers/plugins/memberof/memberof.c b/ldap/servers/plugins/memberof/memberof.c index d1d6181..2eb8375 100644 --- a/ldap/servers/plugins/memberof/memberof.c +++ b/ldap/servers/plugins/memberof/memberof.c @@ -550,7 +550,7 @@ int memberof_postop_del(Slapi_PBlock *pb) Slapi_Attr *attr = 0;
/* Loop through to find each grouping attribute separately. */ - for (i = 0; configCopy.groupattrs[i] && ret == LDAP_SUCCESS; i++) + for (i = 0; configCopy.groupattrs && configCopy.groupattrs[i] && ret == LDAP_SUCCESS; i++) { if (0 == slapi_entry_attr_find(e, configCopy.groupattrs[i], &attr)) { @@ -866,7 +866,7 @@ int memberof_postop_modrdn(Slapi_PBlock *pb)
/* get a list of member attributes present in the group * entry that is being renamed. */ - for (i = 0; configCopy.groupattrs[i]; i++) + for (i = 0; configCopy.groupattrs && configCopy.groupattrs[i]; i++) { if(0 == slapi_entry_attr_find(post_e, configCopy.groupattrs[i], &attr)) { @@ -900,7 +900,7 @@ int memberof_postop_modrdn(Slapi_PBlock *pb) Slapi_Attr *attr = 0;
/* Loop through to find each grouping attribute separately. */ - for (i = 0; configCopy.groupattrs[i] && ret == LDAP_SUCCESS; i++) { + for (i = 0; configCopy.groupattrs && configCopy.groupattrs[i] && ret == LDAP_SUCCESS; i++) { if (0 == slapi_entry_attr_find(pre_e, configCopy.groupattrs[i], &attr)) { if((ret = memberof_del_attr_list(pb, &configCopy, pre_sdn, attr))){ slapi_log_error( SLAPI_LOG_FATAL, MEMBEROF_PLUGIN_SUBSYSTEM, @@ -1648,7 +1648,7 @@ memberof_modop_one_replace_r(Slapi_PBlock *pb, MemberOfConfig *config, ll->next = stack; /* Go through each grouping attribute one at a time. */ - for (i = 0; config->groupattrs[i]; i++) + for (i = 0; config->groupattrs && config->groupattrs[i]; i++) { slapi_entry_attr_find( e, config->groupattrs[i], &members ); if(members) @@ -2165,7 +2165,7 @@ int memberof_is_direct_member(MemberOfConfig *config, Slapi_Value *groupdn, if(group_e) { /* See if memberdn is referred to by any of the group attributes. */ - for (i = 0; config->groupattrs[i]; i++) + for (i = 0; config->groupattrs && config->groupattrs[i]; i++) { slapi_entry_attr_find(group_e, config->groupattrs[i], &attr ); if(attr && (0 == slapi_attr_value_find(attr, slapi_value_get_berval(memberdn)))) @@ -2194,7 +2194,7 @@ static int memberof_is_grouping_attr(char *type, MemberOfConfig *config) int match = 0; int i = 0;
- for (i = 0; config && config->groupattrs[i]; i++) + for (i = 0; config && config->groupattrs && config->groupattrs[i]; i++) { match = slapi_attr_types_equivalent(type, config->groupattrs[i]); if (match) @@ -2419,7 +2419,7 @@ memberof_replace_list(Slapi_PBlock *pb, MemberOfConfig *config, slapi_pblock_get( pb, SLAPI_ENTRY_PRE_OP, &pre_e ); slapi_pblock_get( pb, SLAPI_ENTRY_POST_OP, &post_e ); - for (i = 0; config && config->groupattrs[i]; i++) + for (i = 0; config && config->groupattrs && config->groupattrs[i]; i++) { if(pre_e && post_e) { diff --git a/ldap/servers/plugins/replication/cl5_clcache.c b/ldap/servers/plugins/replication/cl5_clcache.c index ca8b841..519ffca 100644 --- a/ldap/servers/plugins/replication/cl5_clcache.c +++ b/ldap/servers/plugins/replication/cl5_clcache.c @@ -385,8 +385,8 @@ clcache_load_buffer_bulk ( CLC_Buffer *buf, int flag ) #endif
if (NULL == buf) { - slapi_log_error ( SLAPI_LOG_FATAL, "clcache_load_buffer_bulk", - "NULL buf\n" ); + slapi_log_error (SLAPI_LOG_FATAL, get_thread_private_agmtname(), + "clcache_load_buffer_bulk - NULL buf\n" ); return rc; } if (NULL == buf->buf_busy_list) {
389-commits@lists.fedoraproject.org