[PATCH] s4-drs: Synchronous Implementation of generated ParentGUID - ToDo List ParentGUID fix

Fernando J V da Silva fernandojvsilva at yahoo.com.br
Tue Nov 17 12:10:12 MST 2009


Hi Tridge!

I'm sending another patch, trying to solve the issues found on the last
one...


> The change in operational_search() is not correct. You can see what is
> wrong by trying the following two searches, which should produce the
> same result:
>
>  ldbsearch -H $PREFIX/private/sam.ldb objectclass=user createtimestamp
> parentguid
>  ldbsearch -H $PREFIX/private/sam.ldb objectclass=user parentguid
> createtimestamp
>
> If you try it with your patch, you'll see that the first search
> correctly produces both the createtimestamp and parentguid attributes,
> but the 2nd search only produces the parentguid. The reason is that
> you are putting a NULL value into the search_attrs[] array, which
> terminates the array, so the backend never sees the request for the
> createtimestamp attribute.
>
>
On a try to solve it, I used "" instead of NULL. It doesn't seem to be a
nice solution, but if I don't replace for anything, it will return the
stored parentGUID for objects that have it... Another option, I guess, would
be to save the number of elements on the array, right? ... would it be
preferred?


> I also suspect you could remove a bit more code from objectclass.c. If
> you look in objectclass_rename() then you'll see this comment:
>
>        /* note that the results of this search are kept and used to
>           update the parentGUID in objectclass_rename_callback() */
>
> perhaps we could remove that search completely? You should see if you
> can, making sure that everything still works (check the code
> carefully, and also run "make test").
>
>
I made a few tests and it seems that this search for the parent is necessary
to validate de DN at objectclass_do_rename(), but I could remove the
objectGUID attribute on this search.


I'm going to take a look on the tests scripts to see if I can write
something more!


Best regards,

-- 
Fernando J V da Silva
M Sc Computer Science Student
Institute of Computing, State University of Campinas
+55 15 8801-2165
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-s4-drs-Synchronous-Implementation-of-generated-Pare.patch
Type: text/x-patch
Size: 10064 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20091117/7d5eb409/attachment.bin>


More information about the samba-technical mailing list