http://gitweb.samba.org/?p=tridge/samba.git; a=shortlog; h=refs/heads/drs-linked-attribs

tridge at samba.org tridge at samba.org
Thu Dec 31 13:52:39 MST 2009


Hi Metze,

 > It could be that we should not return the value (DELETED=1), but
 > the isPresent flag is true.

we do return isPresent=true in the code now. We return it when
"DELETED" is not present. When DELETED=1 we return isPresent=false.

 > I assume that can happen when the target is deleted and we have the
 > recycle bin feature enabled.

When that happens isPresent is returned as true, but the link is not
shown in a search unless the SHOW_DEACTIVATED_LINK control is given. 

The msDS-ReplValueMetaData contents for a deactivated link like this
looks the same as for a normal link and the linked attribute is sent
in getncchanges with FLAG_ACTIVE=1. So the only indication that the
link should not be shown in a search is that the target has
isDeleted=TRUE.

When we add recycle bin support (maybe next week?) I think we should
handle this by adding a DEACTIVATED=1 component to the GUID when the
target is deleted. Then the extended_dn_out module can check for this
value in a similar fashion to how it checks for DELETED=1 and not show
the link unless the SHOW_DEACTIVATED_LINK control is set.

Alternatively we could put both of these flags in a RMD_FLAGS
component, and add a dsdb_dn_get_rmd_flags() function which grabs the
flags directly out of a DN without unpacking it (using memmem() for
"<RMD_FLAGS=" followed by strtoul()). The RMD_FLAGS value would not
correspond to the value sent in struct
drsuapi_DsReplicaLinkedAttribute, but that value could be easily
constructed from RMD_FLAGS.

Either approach will work fine I think, and the speed will probably be
similar.

Cheers, Tridge


More information about the samba-technical mailing list