Bug 171853

Summary: Microsoft schema in Small Biz Server breaks our entry parser
Product: [Retired] 389 Reporter: Rich Megginson <rmeggins>
Component: Sync ServiceAssignee: Rich Megginson <rmeggins>
Status: CLOSED NEXTRELEASE QA Contact: Orla Hegarty <ohegarty>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.1CC: dboreham, nkinder, ohegarty
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-11-04 23:54:56 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:

Description Rich Megginson 2005-10-27 02:28:47 UTC
+++ This bug was initially created as a clone of Bug #163064 +++

William Francis <wfrancis> reported this problem:

[11/Jul/2005:14:04:25 -0700] NSMMReplicationPlugin - received entry from
dirsync: CN=CERTSVC_DCOM_ACCESS,CN=Users,DC=foo,DC=local
[11/Jul/2005:14:04:25 -0700] - Windows sync entry: Adding new local entry dn:
cn=CERTSVC_DCOM_ACCESS,ou=People, dc=foo,dc=local
objectClass: top
objectClass: groupofuniquenames
objectClass: ntGroup
objectClass: mailGroup
ntGroupDeleteGroup: true
cn: CERTSVC_DCOM_ACCESS
uniqueMember: cn=Domain Users,ou=People, dc=foo,dc=local
uniqueMember: cn=Domain Computers,ou=People, dc=foo,dc=local
ntUserDomainId: CERTSVC_DCOM_ACCESS
ntGroupType: -2147483644
ntUniqueId: 9026e7fff82d82438fc84cc0b730316d

[11/Jul/2005:14:04:25 -0700] NSMMReplicationPlugin - ruv_add_csn_inprogress:
successfully inserted csn 42d2ded9000500010000 into pending list
[11/Jul/2005:14:04:25 -0700] NSMMReplicationPlugin - ruv_update_ruv:
successfully committed csn 42d2ded9000500010000
[11/Jul/2005:14:04:25 -0700] NSMMReplicationPlugin - received entry from
dirsync: CN=Cert Publishers,CN=Users,DC=foo,DC=local
[11/Jul/2005:14:04:25 -0700] - add value "20050627201404.0Z" to attribute type
"dscorepropagationdata" in entry "CN=TH000716,OU=Domain
Controllers,DC=foo,DC=local" failed: duplicate new value 

It seems that there is yet more schema out there in Microsoft-land that
breaks the slapd entry parsing code (it can't distinguish between 
multiple attribute values and then breaks after concluding that they're
identical, which isn't allowed).

We have some code already to detect the examples of this syndrome that
showed up in testing. Probably we need to add this one too.

-- Additional comment from dboreham on 2005-07-12 14:21 EST --
I think this should fix this particular problem:

diff -U8 -r1.15 windows_connection.c
--- windows_connection.c        9 May 2005 20:36:14 -0000       1.15
+++ windows_connection.c        12 Jul 2005 18:21:21 -0000
@@ -502,17 +502,17 @@
         * dn not allocated by slapi
         * attribute type and values ARE allocated
         */

        slapi_entry_set_dn( e, ldap_get_dn( ld, msg ) );

        for ( a = ldap_first_attribute( ld, msg, &ber ); a!=NULL;
a=ldap_next_attribute( ld, msg, ber ) )
        {
-               if (0 == strcasecmp(a,"dnsRecord") || 0 ==
strcasecmp(a,"dnsproperty"))
+               if (0 == strcasecmp(a,"dnsRecord") || 0 ==
strcasecmp(a,"dnsproperty") || 0 == strcasecmp(a,"dscorepropagationdata")
)
                {
                        /* AD returns us entries with these attributes that we
are not interested in,
                         * but they break the entry attribute code (I think it
is looking at null-terminated
                         * string values, but the values are binary here). So we
skip those attributes as a workaround.
                         */
                        ;
                } else
                {

Comment 1 To Ngan 2005-11-04 23:54:56 UTC
Verified with Bug #163064