[PATCH] s4-drs: If modify sets attrib to same value then no replPropertyMetaData change
tridge at samba.org
tridge at samba.org
Mon Feb 15 04:14:54 MST 2010
Hi Fernando,
> Attached is a patch that tries to solve the DRS ToDo List item:
> http://wiki.samba.org/index.php/Samba4/DRS_TODO_List#If_modify_sets_attrib_to_same_value_then_no_replPropertyMetaData_change
thanks!
I modified your patch a bit before pushing it. You don't need to add
all the elements to the attrs[] array, we can just use '*'. If
replPropertyMetaData was a attribute that always showed up then we
could in fact just use NULL for the attrs, but as we need to force
replPropertyMetaData, then using [ "replPropertyMetaData", "*", NULL ]
works nicely.
The other main change I made was to use dsdb_module_search_dn() in
replmd_update_rpmd() with several flags to ensure we get the true
values on disk. You may have noticed that your patch didn't pass 'make
test', and this was because it didn't do a replPropertyMetaData update
when the change was for a linked attribute that only changed in GUID,
or when a change didn't take account of an already deleted linked
attribute. By passing the right controls down we can avoid that, and
make test now passes.
The if() statement you had for replmd_update_rpmd_element() was also a
bit awkward. It is simpler just to pass old_el.
Thanks for the patch, and nice to have another todo item completed!
Cheers, Tridge
More information about the samba-technical
mailing list