Bug 179810

Summary: crash: modify/delete when attr name doesn't match database
Product: [Retired] 389 Reporter: Rich Megginson <rmeggins>
Component: Directory ServerAssignee: Rich Megginson <rmeggins>
Status: CLOSED NEXTRELEASE QA Contact: Orla Hegarty <ohegarty>
Severity: medium Docs Contact:
Priority: medium    
Version: 1.0CC: ohegarty, security-response-team, tlanfranchi
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard: 1.0.2
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-03-13 19:14:23 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 159328, 182367, 182630, 183369    

Description Rich Megginson 2006-02-03 02:57:58 UTC
This bug was introduced with RHDS 7.1 sp 1 - the fix to bug 164843.  The root
cause of the problem is that slapi_attr_type_cmp with SLAPI_TYPE_CMP_EXACT does
a case sensitive match.  Attribute types are case insensitive.

Comment 1 Rich Megginson 2006-02-03 02:59:01 UTC
The problem also exists in Fedora DS 1.0 and 1.0.1.

Comment 2 Rich Megginson 2006-02-03 03:01:03 UTC
Here is the one line fix:
*** attr.c.~1.6.~	2005-08-24 18:58:27.000000000 -0600
--- attr.c	2006-02-02 18:45:49.000000000 -0700
***************
*** 112,118 ****
  
      switch ( opt ) {
      case SLAPI_TYPE_CMP_EXACT: /* compare base name + options as given */
!         rc = strcmp( a1, a2 );
  		break;
  
      case SLAPI_TYPE_CMP_BASE: /* ignore options on both names - compare base
names only */
--- 112,118 ----
  
      switch ( opt ) {
      case SLAPI_TYPE_CMP_EXACT: /* compare base name + options as given */
!         rc = strcasecmp( a1, a2 );
  		break;
  
      case SLAPI_TYPE_CMP_BASE: /* ignore options on both names - compare base
names only */


Comment 3 Rich Megginson 2006-02-14 15:27:00 UTC
*** Bug 180349 has been marked as a duplicate of this bug. ***

Comment 4 Rich Megginson 2006-02-23 20:51:06 UTC
Checking in ldapserver/ldap/servers/slapd/attr.c;
/cvs/dirsec/ldapserver/ldap/servers/slapd/attr.c,v  <--  attr.c
new revision: 1.7; previous revision: 1.6
done


Comment 5 Orla Hegarty 2006-03-13 19:14:23 UTC
After discussing this bug with development it turns out that QE will not be able
to observe a failing case for this issue. It failed on an interim build of DS
7.1 SP 1 and not on DS 7.1 SP 1 GA bits. I have developed a test case which
*should* verify the problem if it were to occur again in the future and it has
been reviewed by Rich.