[389-devel] Entry USN (additional changes)

Noriko Hosoi nhosoi at redhat.com
Tue Jul 21 20:08:39 UTC 2009


Regarding the first question from Andrey:

    The USNs seem to be unique within a suffix/backend. Should we enable
    the uniqueness plug-in for them? If not can we be sure that a manual
    change of entryUSN will not interfere with the correct functioning
    of the plug-in?

Nathan suggested to set SLAPI_ATTR_FLAG_NOUSERMOD to the attribute 
entryusn as follows.

    diff --git a/ldap/servers/slapd/back-ldbm/init.c
    b/ldap/servers/slapd/back-ldbm/
    index a4ff79c..be9c114 100644
    --- a/ldap/servers/slapd/back-ldbm/init.c
    +++ b/ldap/servers/slapd/back-ldbm/init.c
    @@ -86,7 +86,7 @@ ldbm_back_add_schema( Slapi_PBlock *pb )
     
            rc |= add_ldbm_internal_attr_syntax( "entryusn",
                            LDBM_ENTRYUSN_OID, INTEGER_SYNTAX_OID,
    INTFIRSTCOMPMATCH
    -                       SLAPI_ATTR_FLAG_SINGLE );
    +                      
    SLAPI_ATTR_FLAG_SINGLE|SLAPI_ATTR_FLAG_NOUSERMOD );
     
            return rc;
     }

The flag nicely prevents the manual update on EntryUSN.

    ldapmodify -D "cn=Directory Manager" -w /password/
    dn: uid=tuserX,dc=example,dc=com
    changetype: modify
    replace: entryusn
    entryusn: 100

    modifying entry uid=tuserX,dc=example,dc=com
    ldap_modify: DSA is unwilling to perform
    ldap_modify: additional info: no modifiable attributes specified

Nathan also pointed out several typos as well as an issue of internal 
deletion.  Currently, if the delete is initiated internally, the entry 
is not converted to a tombstone unless the backend is replicated.  I'm 
adding this issue to ToDo list for now. 

Attached patch includes the above diff and typo fixes.

Thanks so much to Nathan for his reviews and suggestions.
--noriko

Noriko Hosoi wrote:
> First cut for implementing Entry USN.
> See http://directory.fedoraproject.org/wiki/Entry_USN for the design 
> details.
> This change includes a bug fix for "db2ldif -r"; event queue system 
> was not
> shutdown before the plugins are closed, which could have crashed the 
> command
> line utility.
>
> Thanks,
> --noriko
> ------------------------------------------------------------------------
>
> --
> 389-devel mailing list
> 389-devel at redhat.com
> https://www.redhat.com/mailman/listinfo/fedora-directory-devel

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Entry-USN.patch
Type: text/x-patch
Size: 106348 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/fedora-directory-devel/attachments/20090721/c0d1a7f7/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3250 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://listman.redhat.com/archives/fedora-directory-devel/attachments/20090721/c0d1a7f7/attachment-0001.bin>


More information about the Fedora-directory-devel mailing list