VERSION.sh | 2 +-
ldap/servers/plugins/cos/cos_cache.c | 24 ++++++++++--------------
ldap/servers/plugins/dna/dna.c | 8 +++++---
ldap/servers/plugins/mep/mep.c | 3 ++-
ldap/servers/slapd/plugin_syntax.c | 2 +-
ldap/servers/slapd/util.c | 7 ++-----
ldap/systools/idsktune.c | 33 +++++++++++++++++++++------------
7 files changed, 42 insertions(+), 37 deletions(-)
New commits:
commit 000d6b708f8059ab25c4282384f0e47ffc3c6e79
Author: Rich Megginson <rmeggins(a)redhat.com>
Date: Mon Mar 5 12:10:11 2012 -0700
bump version to 1.2.10.3
diff --git a/VERSION.sh b/VERSION.sh
index 45f8369..6c519eb 100644
--- a/VERSION.sh
+++ b/VERSION.sh
@@ -10,7 +10,7 @@ vendor="389 Project"
# PACKAGE_VERSION is constructed from these
VERSION_MAJOR=1
VERSION_MINOR=2
-VERSION_MAINT=10.2
+VERSION_MAINT=10.3
# if this is a PRERELEASE, set VERSION_PREREL
# otherwise, comment it out
# be sure to include the dot prefix in the prerel
commit b05139ba374e947fad681d6c97af5dc3800c4bda
Author: Rich Megginson <rmeggins(a)redhat.com>
Date: Thu Mar 1 18:50:05 2012 -0700
memleak in normalize_mods2bvals
do not re malloc the berval again - only need to do it once
Reviewed by: nhosoi (Thanks!)
(cherry picked from commit f6e4d3d0d4313ef9b4396ab8433a1c260989274b)
diff --git a/ldap/servers/slapd/util.c b/ldap/servers/slapd/util.c
index 9cd3656..649b3a9 100644
--- a/ldap/servers/slapd/util.c
+++ b/ldap/servers/slapd/util.c
@@ -464,16 +464,13 @@ normalize_mods2bvals(const LDAPMod **mods)
normmbvp = normalized_mods[w]->mod_bvalues;
mvp && *mvp; mvp++, normmbvp++)
{
- *normmbvp =
- (struct berval *)slapi_ch_malloc(sizeof(struct berval));
-
vlen = strlen(*mvp);
+ *normmbvp =
+ (struct berval *)slapi_ch_malloc(sizeof(struct berval));
if (is_dn_syntax) {
Slapi_DN *sdn = slapi_sdn_new_dn_byref(*mvp);
if (slapi_sdn_get_dn(sdn)) {
- *normmbvp =
- (struct berval *)slapi_ch_malloc(sizeof(struct berval));
(*normmbvp)->bv_val =
slapi_ch_strdup(slapi_sdn_get_dn(sdn));
(*normmbvp)->bv_len = slapi_sdn_get_ndn_len(sdn);
commit c0eea24cb59f234903839604dd1be521897c3c58
Author: Rich Megginson <rmeggins(a)redhat.com>
Date: Thu Mar 1 18:47:34 2012 -0700
memleak in mep_parse_config_entry
pass in value to slapi_sdn_new_dn_passin() so that entry->template_sdn
will own the memory
Reviewed by: nhosoi (Thanks!)
(cherry picked from commit 54fbe0b3b3669a0379a4b0a50769b4855539c225)
diff --git a/ldap/servers/plugins/mep/mep.c b/ldap/servers/plugins/mep/mep.c
index 303d9b3..e5b41cb 100644
--- a/ldap/servers/plugins/mep/mep.c
+++ b/ldap/servers/plugins/mep/mep.c
@@ -631,7 +631,8 @@ mep_parse_config_entry(Slapi_Entry * e, int apply, Slapi_PBlock *pb)
if (value) {
Slapi_Entry *test_entry = NULL;
- entry->template_sdn = slapi_sdn_new_dn_byval(value);
+ entry->template_sdn = slapi_sdn_new_dn_passin(value);
+ value = NULL; /* entry->template_sdn owns value now */
/* Fetch the managed entry template */
slapi_search_internal_get_entry_ext(entry->template_sdn, 0,
commit 90bc9eb924e373f38ad1a8ccd25aecd74a2799e0
Author: Rich Megginson <rmeggins(a)redhat.com>
Date: Wed Feb 29 17:27:32 2012 -0700
handle null smods
Under certain error conditions, smods will be NULL at the end of the function.
Do not call passout if smods is NULL.
Reviewed by: nhosoi (Thanks!)
(cherry picked from commit afd6b1fd63c48642dd050e0e821b3d7c69fc4991)
diff --git a/ldap/servers/plugins/dna/dna.c b/ldap/servers/plugins/dna/dna.c
index a422055..a6d63a9 100644
--- a/ldap/servers/plugins/dna/dna.c
+++ b/ldap/servers/plugins/dna/dna.c
@@ -3179,9 +3179,11 @@ static int dna_pre_op(Slapi_PBlock * pb, int modtype)
bailmod:
if (LDAP_CHANGETYPE_MODIFY == modtype) {
/* Put the updated mods back into place. */
- mods = slapi_mods_get_ldapmods_passout(smods);
- slapi_pblock_set(pb, SLAPI_MODIFY_MODS, mods);
- slapi_mods_free(&smods);
+ if (smods) { /* smods == NULL if we bailed before initializing it */
+ mods = slapi_mods_get_ldapmods_passout(smods);
+ slapi_pblock_set(pb, SLAPI_MODIFY_MODS, mods);
+ slapi_mods_free(&smods);
+ }
}
bail:
commit b9ab70a3594830daed65035031520f6d310b2540
Author: Mark Reynolds <mareynol(a)redhat.com>
Date: Fri Mar 2 11:51:58 2012 -0500
Ticket #305 - Certain CMP operations hang or cause ns-slapd to crash
Bug Description: There is a potential double free in cos_cache_query_attr(). If you
run concurrent search or compares its very easy to crash the
server in this code
Fix Description: Moved the DN normalization into the cache rebuilding code.
https://fedorahosted.org/389/ticket/305
(cherry picked from commit 142c8f0fe93d77990df8ce991a8020918276ddd8)
diff --git a/ldap/servers/plugins/cos/cos_cache.c b/ldap/servers/plugins/cos/cos_cache.c
index b2237ee..a93d0b5 100644
--- a/ldap/servers/plugins/cos/cos_cache.c
+++ b/ldap/servers/plugins/cos/cos_cache.c
@@ -786,6 +786,7 @@ static int cos_dn_defs_cb (Slapi_Entry* e, void *callback_data)
int valIndex = 0;
Slapi_Attr *dnAttr;
char *attrType = 0;
+ char *norm_dn = NULL;
info=(struct dn_defs_info *)callback_data;
@@ -807,9 +808,16 @@ static int cos_dn_defs_cb (Slapi_Entry* e, void *callback_data)
pSneakyVal = 0;
if(!slapi_utf8casecmp((unsigned char*)attrType, (unsigned
char*)"objectclass"))
pSneakyVal = &pObjectclass;
- else if(!slapi_utf8casecmp((unsigned char*)attrType, (unsigned
char*)"cosTargetTree"))
+ else if(!slapi_utf8casecmp((unsigned char*)attrType, (unsigned
char*)"cosTargetTree")){
+ if(pCosTargetTree){
+ norm_dn = slapi_create_dn_string("%s", pCosTargetTree->val);
+ if(norm_dn){
+ slapi_ch_free_string(&pCosTargetTree->val);
+ pCosTargetTree->val = norm_dn;
+ }
+ }
pSneakyVal = &pCosTargetTree;
- else if(!slapi_utf8casecmp((unsigned char*)attrType, (unsigned
char*)"cosTemplateDn"))
+ } else if(!slapi_utf8casecmp((unsigned char*)attrType, (unsigned
char*)"cosTemplateDn"))
pSneakyVal = &pCosTemplateDn;
else if(!slapi_utf8casecmp((unsigned char*)attrType, (unsigned
char*)"cosSpecifier"))
pSneakyVal = &pCosSpecifier;
@@ -2387,18 +2395,6 @@ static int cos_cache_query_attr(cos_cache *ptheCache, vattr_context
*context, Sl
* hits. We only check if this entry is a child of the target tree(s). */
while((hit == 0 || merge_mode) && pTargetTree)
{
- {
- char *normed = slapi_create_dn_string("%s", pTargetTree->val);
- if (normed) {
- slapi_ch_free_string(&pTargetTree->val);
- pTargetTree->val = normed;
- } else {
- LDAPDebug(LDAP_DEBUG_ANY,
- "cos_cache_query_attr: failed to normalize dn %s. "
- "Processing the pre normalized dn.\n",
- pTargetTree->val, 0, 0);
- }
- }
if( pTargetTree->val == 0 ||
slapi_dn_issuffix(pDn, pTargetTree->val) != 0 ||
(views_api && views_entry_exists(views_api, pTargetTree->val, e)) /* might
be in a view */
commit d640d75e0894f922765e1738224d8f3c1b303685
Author: Mark Reynolds <mareynol(a)redhat.com>
Date: Wed Feb 29 10:33:32 2012 -0500
Ticket #306 - void function cannot return value
Bug Description: slapi_attr_value_normalize() was trying to return
slapi_attr_value_normalize_ext().
Fix Description: Instead of returning the function, we just call it.
Currently this function is not being used by the DS,
but it should be fixed.
https://fedorahosted.org/389/ticket/306
(cherry picked from commit 3d623c07a380d497e0566d0dd6496667016922a7)
diff --git a/ldap/servers/slapd/plugin_syntax.c b/ldap/servers/slapd/plugin_syntax.c
index 0438ceb..840fa7a 100644
--- a/ldap/servers/slapd/plugin_syntax.c
+++ b/ldap/servers/slapd/plugin_syntax.c
@@ -991,5 +991,5 @@ slapi_attr_value_normalize(
char **retval
)
{
- return slapi_attr_value_normalize_ext(pb, sattr, type, val, trim_spaces, retval, 0);
+ slapi_attr_value_normalize_ext(pb, sattr, type, val, trim_spaces, retval, 0);
}
commit 46536621359142d1ffa1a83eb57c78575c22839f
Author: Nathan Kinder <nkinder(a)redhat.com>
Date: Thu Feb 23 13:51:31 2012 -0800
ticket 304 - Fix kernel version checking in dsktune
The kernel version cehcking in dsktune is incorrect. It takes each
version element and checks it separately, without factoring in the
check for the previous version element. This causes checks like
3.2.5 > 2.4.7 to be evaluated as false.
This fix factors in the previous version element comparison, which
ensures that the version is evaluated correctly as a whole.
(cherry picked from commit e2a1090098fd2bcdd37dc1e9870cad46d975761c)
diff --git a/ldap/systools/idsktune.c b/ldap/systools/idsktune.c
index a16c27c..e0f485c 100644
--- a/ldap/systools/idsktune.c
+++ b/ldap/systools/idsktune.c
@@ -44,7 +44,7 @@
/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
* Don't forget to update build_date when the patch sets are updated.
* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */
-static char *build_date = "10-AUGUST-2007";
+static char *build_date = "23-FEBRUARY-2012";
#if defined(__FreeBSD__) || defined(__bsdi)
#define IDDS_BSD_INCLUDE 1
@@ -1112,6 +1112,9 @@ linux_check_release(void)
FILE *fp;
char osl[128];
char *cmd = strdup("/bin/uname -r");
+ int major = 0;
+ int minor = 0;
+ int revision = 0;
if (cmd == NULL) {
printf("ERROR: Unable to allocate memory\n");
@@ -1139,20 +1142,26 @@ linux_check_release(void)
printf("DEBUG : %s\n",osl);
}
- if (atoi(strtok(osl, ".")) < 2) {
- printf("ERROR: We support kernel version 2.4.7 and higher.\n\n");
- flag_os_bad = 1;
- goto done;
- }
- if (atoi(strtok(NULL, ".")) < 4) {
- printf("ERROR: We support kernel version 2.4.7 and higher.\n\n");
- flag_os_bad = 1;
- goto done;
- }
- if (atoi(strtok(NULL, "-")) < 7) {
+ major = atoi(strtok(osl, "."));
+ minor = atoi(strtok(NULL, "."));
+ revision = atoi(strtok(NULL, "-"));
+
+ if (major < 2) {
printf("ERROR: We support kernel version 2.4.7 and higher.\n\n");
flag_os_bad = 1;
goto done;
+ } else if (major == 2) {
+ if (minor < 4) {
+ printf("ERROR: We support kernel version 2.4.7 and higher.\n\n");
+ flag_os_bad = 1;
+ goto done;
+ } else if (minor == 4) {
+ if (revision < 7) {
+ printf("ERROR: We support kernel version 2.4.7 and higher.\n\n");
+ flag_os_bad = 1;
+ goto done;
+ }
+ }
}
done:
if (cmd) free(cmd);