e2b8468 Ticket #47735 - e_uniqueid fails to set if an entry is a conflict entry

Authored and Committed by nhosoi 5 years ago
    Ticket #47735 - e_uniqueid fails to set if an entry is a conflict entry
    
    Bug Description:
    When an entry is turned to be a conflict entry, its nsUniqueId has
    a mdcsn info as a subtype like this:
     nsUniqueId;mdcsn-5319136f000200010000: c5e0d787-a58f11e3-b7f9dfd1-acc3d5e4
    In this case, the attribute type is assigned to the berval "type"
    as follows:
     type.bv_val = "nsUniqueId;mdcsn-5319136f000200010000"
     type.bv_len = 37
    The subtyped stateinfo is processed in str2entry_state_information_from_type,
    which modifies type.bv_val to "nsUniqueId", but type.bv_len remains 37.
    str2entry_fast has this logic to set e_uniqueid, where the nsUniqueId
    with stateinfo fails to set the value to e_uniqueid.
     if ( type.bv_len == 10 &&
          PL_strncasecmp (type.bv_val, "nsUniqueId", type.bv_len) == 0 ){
    
    Fix Description: This patch resets the length of the type with the
    basetype length 10 before the if expression is called for setting
    e_uniqueid.
    
    https://fedorahosted.org/389/ticket/47735
    
    Reviewed by rmeggins@redhat.com (Thank you, Rich!!)
    (cherry picked from commit 07bd2259cc45c9d5c193b15faaf0d0c60e1b723c)
    (cherry picked from commit 6e0ffbe1bdde99cfd71a5617d89482eef4696c7f)
    (cherry picked from commit d4350bd0724c37040a4aaf361a10918c925b7605)
    
        
file modified
+36 -24