<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 12 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
        {page:Section1;}
-->
</style><!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="Section1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D">Kamen,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#002060">&nbsp; &nbsp;For your question regarding the algorithm used in UpdateObject() , as documented in 4.1.10.6.9 of MS-DRSR, &nbsp;I think that the RemoveObj() &nbsp;was performed
 after </span><span style="font-size:11.0pt;
font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#002060">PerformModifyOperation just to ensure the attributes on the deleted object conform to the invariants of a tombstone or deleted-object(see 3.1..1.5.5 of &nbsp;MS-ADTS).&nbsp;&nbsp;
 This is mentioned in the comments of the algorithm before RemoveObj is called.&nbsp; &nbsp;&nbsp;Furthermore, as per 5.154 of MS-DRSR, RemoveObj procedure performs a delete operation on an object so the targeted object will be transformed to a deleted-object or a tombstone
 ,depending on the state of the Recycle Bin option feature.&nbsp; This includes modifying the attributes and moving into the Deleted Container of its NC.&nbsp; But it will not remove the objects from the directory directly.&nbsp;&nbsp;&nbsp; If the object after PerformModifyOperation
 already conforms to the invariant of deleted-object or tombstone,&nbsp; the RemoveObj may do nothing to the object.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#002060"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#002060">&nbsp; Please let me know if I understand you question properly and if you have further questions.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#002060"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#002060">Thanks!<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#002060"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#002060">Hongwei&nbsp; &nbsp;&nbsp;&nbsp;<o:p></o:p></span></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">&nbsp;<span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;">From:</span></b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;"> cifs-protocol-bounces@cifs.org [mailto:cifs-protocol-bounces@cifs.org]
<b>On Behalf Of </b>Kamen Mazdrashki<br>
<b>Sent:</b> Tuesday, May 18, 2010 7:33 AM<br>
<b>To:</b> Interoperability Documentation Help; cifs-protocol@samba.org; pfif@tridgell.net<br>
<b>Subject:</b> [cifs-protocol] Replicating deleted object procedure clarifications<o:p></o:p></span></p>
</div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">Dear Dochelp,<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal">I am currently trying to refactor Delete object implementation in Samba and I need some help<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">with algorithm used for deleting objects and how the deletion is replicated to other DCs.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal">Reference:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">&nbsp;ProcessGetNCChangesReply [MS-DRSR] -&nbsp;<a href="http://msdn.microsoft.com/en-us/library/dd207758(v=PROT.13).aspx" target="_blank">http://msdn.microsoft.com/en-us/library/dd207758(v=PROT.13).aspx</a><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">&nbsp;&nbsp; &nbsp;UpdateObject [MS-DRSR] -&nbsp;<a href="http://msdn.microsoft.com/en-us/library/dd207780(v=PROT.13).aspx" target="_blank">http://msdn.microsoft.com/en-us/library/dd207780(v=PROT.13).aspx</a><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">&nbsp;Delete Operation [MS-ADTS] -&nbsp;<a href="http://msdn.microsoft.com/en-us/library/cc223480(v=PROT.13).aspx" target="_blank">http://msdn.microsoft.com/en-us/library/cc223480(v=PROT.13).aspx</a><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal">Consider following sutiation:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">0. We have two DCs configuration.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">&nbsp;&nbsp; &nbsp;We have an OU object with following props:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">&nbsp;&nbsp; &nbsp; &nbsp;dn: OU=TEST_DELETE_0417,DC=samba,DC=devel<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">&nbsp;&nbsp; &nbsp; &nbsp;objectGUID: b7f1b90d-d247-45b7-87fb-f6bc916bd729<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal">1. We delete this OU on DC1. The state of this object on each dc should be as follows:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">&nbsp;&nbsp;DC1:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">&nbsp;&nbsp; &nbsp; &nbsp;dn: OU=TEST_DELETE_0417\0ADEL:b7f1b90d-d247-45b7-87fb-f6bc916bd729,CN=Deleted Objects,DC=samba,DC=devel<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">&nbsp;&nbsp; &nbsp; &nbsp;objectGUID: b7f1b90d-d247-45b7-87fb-f6bc916bd729<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">&nbsp;&nbsp; &nbsp; &nbsp;isDeleted: TRUE<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">&nbsp;&nbsp; &nbsp; &nbsp;isRecycled: TRUE<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">&nbsp;&nbsp;DC2:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">&nbsp;&nbsp; &nbsp; &nbsp;dn: OU=TEST_DELETE_0417,DC=samba,DC=devel<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">&nbsp;&nbsp; &nbsp; &nbsp;objectGUID: b7f1b90d-d247-45b7-87fb-f6bc916bd729<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">&nbsp;&nbsp; &nbsp;<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">2. Replication is triggered from DC1 to DC2.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Now, according to UpdateObject() procedure, we will identify that Object's DN has changed from&nbsp;<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">&quot;dn: OU=TEST_DELETE_0417,DC=samba,DC=devel&quot;&nbsp;<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">to &quot;dn: OU=TEST_DELETE_0417\0ADEL:b7f1b90d-d247-45b7-87fb-f6bc916bd729,CN=Deleted Objects,DC=samba,DC=devel&quot;.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Hence we will modify object's DN (calling&nbsp;PerformModifyDNOperation() operation).<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Which will make this object a Deleted-object right?<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">While progressing further in UpdateObject() procedure, we will check and see, that 'isDeleted'<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">attribute value is TRUE, so we shall call RemoveObj() procedure. At this point I am a little bit puzzled as&nbsp;<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">there are two possible outcomes from this procedure:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">1. Object's RDN should be transformed to a delete-mangled RDN. So we should end with an RDN like:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">&nbsp;TEST_DELETE_0417\0ADEL:b7f1b90d-d247-45b7-87fb-f6bc916bd72\0ADEL:b7f1b90d-d247-45b7-87fb-f6bc916bd72 right?&nbsp;<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">2. Or, as the object is already under &quot;Deleted Object&quot; container (moved there by previous call to PerformModifyOperation()),<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">RemoveObj() procedure should delete it further - i.e. if the object is a Tombstone, it will be completely removed.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal">Sorry that my description gets so messy.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Basically what UpdateObject() states is that first we should execute PerformModifyOperation() and then RemoveObj().<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Which is a little bit confusing, as PerformModifyOperation() will turn the object into a Deleted-object.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Calling RemoveObj() later will actually act on already modified object, so I wonder - how does RemoveObj()<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">knows that we just converted the object and this object should not be completely removed?<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal">Another possibility is for PeformModifyOperation() to determine that target DN will move the object under&nbsp;<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">&quot;Deleted Objects&quot; container, and in this case to modify only Attribute values on the object, but not to call<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">PerformModifyDNOperation() operation?<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><br>
-- <br>
CU,<br>
Kamen Mazdrashki<br>
<a href="mailto:kamen.mazdrashki@postpath.com" target="_blank">kamen.mazdrashki@postpath.com</a><br>
<a href="http://gitweb.samba.org/?p=kamenim/samba.git;a=summary" target="_blank">http://gitweb.samba.org/?p=kamenim/samba.git;a=summary</a><br>
-------------------------------------<br>
CISCO SYSTEMS BULGARIA EOOD<br>
<a href="http://www.cisco.com/global/BG/" target="_blank">http://www.cisco.com/global/BG/</a><o:p></o:p></p>
</div>
</div>
</body>
</html>