RE: ldb_search returns LDB_ERR_NO_SUCH_OBJECT when searching forprefixMap from module - Samba

This is a discussion on RE: ldb_search returns LDB_ERR_NO_SUCH_OBJECT when searching forprefixMap from module - Samba ; Hi The purpose of this module is to update the prefixMap schema attribute the ldb layer when new object or attribute classes are added to the schema via ldap. This is needed because the schema can be extended with objects ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: RE: ldb_search returns LDB_ERR_NO_SUCH_OBJECT when searching forprefixMap from module

  1. RE: ldb_search returns LDB_ERR_NO_SUCH_OBJECT when searching forprefixMap from module

    Hi

    The purpose of this module is to update the prefixMap schema attribute the ldb layer when new object or attribute classes are added to the schema via ldap. This is needed because the schema can be extended with objects whose prefixes not present in the prefixMap, which at this point this causes the samba4 to crash after startup.
    The module has two functions for now:
    * init - reads the prefix map and stores it in a static structure, because we do not want to pull it from the ldb every time we had to check if a new oid has to be added.
    * add - when an attribute or object is added to the schema it checks if the oid is in the pre-cached prefixMap and if not it adds it and writes it in the ldb.

    Regards,
    Anatoliy

    -----Original Message-----
    From: Stefan (metze) Metzmacher [mailto:metze@samba.org]
    Sent: Tuesday, June 24, 2008 14:01
    To: Anatoliy Atanasov
    Cc: samba-technical@lists.samba.org
    Subject: Re: ldb_search returns LDB_ERR_NO_SUCH_OBJECT when searching for prefixMap from module

    Hi Anatoliy,

    > I added a module in dsdb/samdb/ldb_modules called prefix_map. All I need in my init function is to get the prefix map and store it,
    > but I fail when I do ldb_search with error LDB_ERR_NO_SUCH_OBJECT.
    > I tried to copy/paste the code from schema_fsmo_init method and it doesn't work in my function also.
    > I guess my module is not called when it should.


    Can you please explain, what your module is about to do in the end?

    metze


  2. Re: ldb_search returns LDB_ERR_NO_SUCH_OBJECT when searching forprefixMap from module

    Anatoliy Atanasov schrieb:
    > Hi
    >
    > The purpose of this module is to update the prefixMap schema attributethe ldb layer when new object or attribute classes are added to the schema via ldap. This is needed because the schema can be extended with objects whose prefixes not present in the prefixMap, which at this point thiscauses the samba4 to crash after startup.
    > The module has two functions for now:
    > * init - reads the prefix map and stores it in a static structure, because we do not want to pull it from the ldb every time we had to check ifa new oid has to be added.
    > * add - when an attribute or object is added to the schema it checks if the oid is in the pre-cached prefixMap and if not it adds it and writesit in the ldb.


    why don't you use the dsdb_schema->prefixes array, there it's already
    kept in memory, and new attributes or objectclasses are added once every
    few month...we should avoid keeping it in memory twice.

    do you know the algorithm, that's used by windows servers to create a
    new oid mapping? we need to match that algorithm.

    metze


    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.6 (GNU/Linux)
    Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

    iD8DBQFIYRhum70gjA5TCD8RArBKAJ9SbfsYYoUzgaxG4KByfL BWRTZO5ACgxySW
    5PuDdz/AameB7FaA7IB2X+4=
    =wixm
    -----END PGP SIGNATURE-----


+ Reply to Thread