Friday, May 30, 2014

[389-commits] ldap/servers

ldap/servers/slapd/sasl_map.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)

New commits:
commit 43cd7db3298abec4190430287af5a0b9c1379ef5
Author: Mark Reynolds <mreynolds@redhat.com>
Date: Fri May 30 15:50:34 2014 -0400

Ticket 47791 - Negative value of nsSaslMapPriority is not
reset to lowest priority

Description: The value validation of the map priority was not checked for
negative values.

https://fedorahosted.org/389/ticket/47791

Reviewed by: nhosoi(Thanks!)

diff --git a/ldap/servers/slapd/sasl_map.c b/ldap/servers/slapd/sasl_map.c
index 9652c14..ef190f4 100644
--- a/ldap/servers/slapd/sasl_map.c
+++ b/ldap/servers/slapd/sasl_map.c
@@ -388,7 +388,7 @@ sasl_map_config_parse_entry(Slapi_Entry *entry, sasl_map_data **new_dp)
} else {
priority = LOW_PRIORITY;
}
- if(priority == 0 || priority > LOW_PRIORITY){
+ if(priority < 1 || priority > LOW_PRIORITY){
struct berval desc;
struct berval *newval[2] = {0, 0};

@@ -396,11 +396,12 @@ sasl_map_config_parse_entry(Slapi_Entry *entry, sasl_map_data **new_dp)
desc.bv_len = strlen(desc.bv_val);
newval[0] = &desc;
if (entry_replace_values(entry, "nsSaslMapPriority", newval) != 0){
- LDAPDebug( LDAP_DEBUG_TRACE, "sasl_map_config_parse_entry: failed to reset priority to (%d)\n",
- LOW_PRIORITY,0,0);
+ LDAPDebug( LDAP_DEBUG_ANY, "sasl_map_config_parse_entry: failed to reset entry "
+ "priority to (%d) - previous value (%s)\n", LOW_PRIORITY, priority_str, 0);
} else {
- LDAPDebug( LDAP_DEBUG_ANY, "sasl_map_config_parse_entry: resetting nsSaslMapPriority to lowest priority(%d)\n",
- LOW_PRIORITY,0,0);
+ LDAPDebug( LDAP_DEBUG_ANY, "sasl_map_config_parse_entry: resetting invalid nsSaslMapPriority "
+ " value (%s) to the lowest priority (%d)\n",
+ priority_str, LOW_PRIORITY, 0);
}
priority = LOW_PRIORITY;
}


--
389 commits mailing list
389-commits@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/389-commits

No comments:

Post a Comment