Dear Dochelp, I am currently trying to refactor Delete object implementation in Samba and I need some help with algorithm used for deleting objects and how the deletion is replicated to other DCs.
Reference: ProcessGetNCChangesReply [MS-DRSR] - http://msdn.microsoft.com/en-us/library/dd207758(v=PROT.13).aspx UpdateObject [MS-DRSR] - http://msdn.microsoft.com/en-us/library/dd207780(v=PROT.13).aspx <http://msdn.microsoft.com/en-us/library/dd207758(v=PROT.13).aspx> Delete Operation [MS-ADTS] - http://msdn.microsoft.com/en-us/library/cc223480(v=PROT.13).aspx <http://msdn.microsoft.com/en-us/library/cc223480(v=PROT.13).aspx>Consider following sutiation: 0. We have two DCs configuration. We have an OU object with following props: dn: OU=TEST_DELETE_0417,DC=samba,DC=devel objectGUID: b7f1b90d-d247-45b7-87fb-f6bc916bd729 1. We delete this OU on DC1. The state of this object on each dc should be as follows: DC1: dn: OU=TEST_DELETE_0417\0ADEL:b7f1b90d-d247-45b7-87fb-f6bc916bd729,CN=Deleted Objects,DC=samba,DC=devel objectGUID: b7f1b90d-d247-45b7-87fb-f6bc916bd729 isDeleted: TRUE isRecycled: TRUE DC2: dn: OU=TEST_DELETE_0417,DC=samba,DC=devel objectGUID: b7f1b90d-d247-45b7-87fb-f6bc916bd729 2. Replication is triggered from DC1 to DC2. Now, according to UpdateObject() procedure, we will identify that Object's DN has changed from "dn: OU=TEST_DELETE_0417,DC=samba,DC=devel" to "dn: OU=TEST_DELETE_0417\0ADEL:b7f1b90d-d247-45b7-87fb-f6bc916bd729,CN=Deleted Objects,DC=samba,DC=devel". Hence we will modify object's DN (calling PerformModifyDNOperation() operation). Which will make this object a Deleted-object right? While progressing further in UpdateObject() procedure, we will check and see, that 'isDeleted' attribute value is TRUE, so we shall call RemoveObj() procedure. At this point I am a little bit puzzled as there are two possible outcomes from this procedure: 1. Object's RDN should be transformed to a delete-mangled RDN. So we should end with an RDN like: TEST_DELETE_0417\0ADEL:b7f1b90d-d247-45b7-87fb-f6bc916bd72\0ADEL:b7f1b90d-d247-45b7-87fb-f6bc916bd72 right? 2. Or, as the object is already under "Deleted Object" container (moved there by previous call to PerformModifyOperation()), RemoveObj() procedure should delete it further - i.e. if the object is a Tombstone, it will be completely removed. Sorry that my description gets so messy. Basically what UpdateObject() states is that first we should execute PerformModifyOperation() and then RemoveObj(). Which is a little bit confusing, as PerformModifyOperation() will turn the object into a Deleted-object. Calling RemoveObj() later will actually act on already modified object, so I wonder - how does RemoveObj() knows that we just converted the object and this object should not be completely removed? Another possibility is for PeformModifyOperation() to determine that target DN will move the object under "Deleted Objects" container, and in this case to modify only Attribute values on the object, but not to call PerformModifyDNOperation() operation? -- CU, Kamen Mazdrashki [email protected] http://gitweb.samba.org/?p=kamenim/samba.git;a=summary ------------------------------------- CISCO SYSTEMS BULGARIA EOOD http://www.cisco.com/global/BG/
_______________________________________________ cifs-protocol mailing list [email protected] https://lists.samba.org/mailman/listinfo/cifs-protocol
