<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 15 (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:Consolas;
        panose-1:2 11 6 9 2 2 4 3 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;
        color:black;}
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;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;
        color:black;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";
        color:black;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;
        color:black;}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;
        color:black;}
span.EmailStyle21
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></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 bgcolor="white" lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">Hello Tim, below is the summary of the answer for your questions about Linked Value Replication. I have created separate incidents to investigate your questions
 from yesterday’s e-mail below. Will start separate thread for that. <o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">1) Does the client always replicate the partitions in parallel? i.e. it can't replicate them in series because it can't commit an entire partition until it has
 received portions of another partition.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">-- This is an implementation detail. You could come with your own scheme of replicating partitions and managing references until complete details are obtained.
 Multiple transactions may be necessary before you have all the changes. Protocol doesn't place any requirements as to how this can be achieved.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">2) When the DRS_GET_TGT flag is set in the ReplicateNCRequestMsg, Windows does not resolve a target object that is in another partition.  What happens when the
 client encounters a linked attribute with an unknown target object? ProcessLinkValue() in the MS-DRSR seems to imply the client will ignore it (if it's already tried with GET_TGT). So how does the client ensure that it receives the linked attribute eventually?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">--- Correct, Windows does not resolve a target object that is in another partition. It is up to an implementation to tolerate this and “remember” the reference. 
 Protocol does not require anything in particular about when or even if the referred-to object is ever replicated. Nothing in protocol requires a DC to actually have an instance of an object in order to have a value of an attribute on some object that refers
 to that object.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">Additional References:
</span><a href="https://technet.microsoft.com/en-us/library/cc772726(v=ws.10).aspx">https://technet.microsoft.com/en-us/library/cc772726(v=ws.10).aspx</a><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">Regards,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">Sreekanth Nadendla<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">Microsoft Windows Open Specifications<o:p></o:p></span></p>
</div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext"> Sreekanth Nadendla
<br>
<b>Sent:</b> Thursday, June 8, 2017 5:30 PM<br>
<b>To:</b> "Sreekanth Nadendla" <srenaden@microsoft.com><br>
<b>Cc:</b> "cifs-protocol@lists.samba.org" <cifs-protocol@lists.samba.org>; "MSSolve Case Email" <casemail@microsoft.com><br>
<b>Subject:</b> [REG:117060115827644] Re: 117060115827644 Question about DRS client behaviour with linked attributes<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p>Hi Sreekanth,<o:p></o:p></p>
<p>Thanks for the link. I'd already seen that article (or one very similar), but it does provide a lot of useful information about replication.<o:p></o:p></p>
<p>The Docs issues I mentioned in the conference call are as follows:<o:p></o:p></p>
<p>1). A fortnight ago, I raised a minor issue with MS-DRSR 4.1.10.6.14 ProcessLinkValue(). i.e.
<a href="https://msdn.microsoft.com/en-us/library/dd207759.aspx">https://msdn.microsoft.com/en-us/library/dd207759.aspx</a><o:p></o:p></p>
<p>In the following block of code that checks the link target, it looks like it's missing a null check for targetObject.
<o:p></o:p></p>
<p><span style="font-size:10.0pt;font-family:"Courier New"">targetObject = GetDSNameFromAttrVal(replValinf.attrTyp, replValInf.pAval)<br>
if ((IsRecycleBinEnabled() and targetObject!isRecycled) or<br>
    (not IsRecycleBinEnabled() and targetObject!isDeleted)) then<br>
    if (DRS_GET_TGT in ulMoreFlags) then<br>
        /* nothing to do */<br>
        return 0<br>
    else<br>
        return ERROR_DS_DRA_RECYCLED_TARGET<br>
endif</span><o:p></o:p></p>
<p>Presumably it should also return ERROR_DS_DRA_RECYCLED_TARGET if targetObject is null, as this is what triggers the use of the DRS_GET_TGT flag.<o:p></o:p></p>
<p>2). Related to this, the error code used here isn't documented, i.e. it isn't listed on
<a href="https://msdn.microsoft.com/en-us/library/cc231199.aspx">https://msdn.microsoft.com/en-us/library/cc231199.aspx</a><o:p></o:p></p>
<p>I think it should be something like:<o:p></o:p></p>
<p>ERROR_DS_DRA_RECYCLED_TARGET            0x000021BF<o:p></o:p></p>
<p>Thanks for your help.<o:p></o:p></p>
<p>Tim<o:p></o:p></p>
<div>
<p class="MsoNormal">On 08/06/17 09:56, Sreekanth Nadendla wrote:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<pre style="mso-margin-top-alt:5.0pt;margin-right:.5in;margin-bottom:0in;margin-left:.5in;margin-bottom:.0001pt">Hello Tim, below is the article I mentioned and it provides some useful details about Linked value replication scenarios.<o:p></o:p></pre>
<pre><a href="https://technet.microsoft.com/en-us/library/cc772726(v=ws.10).aspx">https://technet.microsoft.com/en-us/library/cc772726(v=ws.10).aspx</a><o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre><o:p> </o:p></pre>
<pre style="mso-margin-top-alt:0in;margin-right:.5in;margin-bottom:0in;margin-left:.5in;margin-bottom:.0001pt">Regards,<o:p></o:p></pre>
<pre style="mso-margin-top-alt:0in;margin-right:.5in;margin-bottom:0in;margin-left:.5in;margin-bottom:.0001pt">Sreekanth Nadendla<o:p></o:p></pre>
<pre style="mso-margin-top-alt:0in;margin-right:.5in;margin-bottom:0in;margin-left:.5in;margin-bottom:.0001pt">Microsoft Windows Open Specifications<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre style="mso-margin-top-alt:0in;margin-right:.5in;margin-bottom:0in;margin-left:.5in;margin-bottom:.0001pt">-----Original Message-----<o:p></o:p></pre>
<pre style="mso-margin-top-alt:0in;margin-right:.5in;margin-bottom:0in;margin-left:.5in;margin-bottom:.0001pt">From: Sreekanth Nadendla <o:p></o:p></pre>
<pre style="mso-margin-top-alt:0in;margin-right:.5in;margin-bottom:0in;margin-left:.5in;margin-bottom:.0001pt">Sent: Thursday, June 1, 2017 5:03 PM<o:p></o:p></pre>
<pre style="mso-margin-top-alt:0in;margin-right:.5in;margin-bottom:0in;margin-left:.5in;margin-bottom:.0001pt">To: 'Tim Beale' <a href="mailto:timbeale@catalyst.net.nz"><timbeale@catalyst.net.nz></a><o:p></o:p></pre>
<pre style="mso-margin-top-alt:0in;margin-right:.5in;margin-bottom:0in;margin-left:.5in;margin-bottom:.0001pt">Cc: <a href="mailto:cifs-protocol@lists.samba.org">cifs-protocol@lists.samba.org</a>; MSSolve Case Email <a href="mailto:casemail@microsoft.com"><casemail@microsoft.com></a><o:p></o:p></pre>
<pre style="mso-margin-top-alt:0in;margin-right:.5in;margin-bottom:0in;margin-left:.5in;margin-bottom:.0001pt">Subject: 117060115827644 Question about DRS client behaviour with linked attributes<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre style="mso-margin-top-alt:0in;margin-right:.5in;margin-bottom:0in;margin-left:.5in;margin-bottom:.0001pt">Hello Tim, I will be assisting you with this issue. <o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre style="mso-margin-top-alt:0in;margin-right:.5in;margin-bottom:0in;margin-left:.5in;margin-bottom:.0001pt">Regards,<o:p></o:p></pre>
<pre style="mso-margin-top-alt:0in;margin-right:.5in;margin-bottom:0in;margin-left:.5in;margin-bottom:.0001pt">Sreekanth Nadendla<o:p></o:p></pre>
<pre style="mso-margin-top-alt:0in;margin-right:.5in;margin-bottom:0in;margin-left:.5in;margin-bottom:.0001pt">Microsoft Windows Open Specifications<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre style="mso-margin-top-alt:0in;margin-right:.5in;margin-bottom:0in;margin-left:.5in;margin-bottom:.0001pt">-----Original Message-----<o:p></o:p></pre>
<pre style="mso-margin-top-alt:0in;margin-right:.5in;margin-bottom:0in;margin-left:.5in;margin-bottom:.0001pt">From: Tim Beale [<a href="mailto:timbeale@catalyst.net.nz">mailto:timbeale@catalyst.net.nz</a>] <o:p></o:p></pre>
<pre style="mso-margin-top-alt:0in;margin-right:.5in;margin-bottom:0in;margin-left:.5in;margin-bottom:.0001pt">Sent: Wednesday, May 31, 2017 8:18 PM<o:p></o:p></pre>
<pre style="mso-margin-top-alt:0in;margin-right:.5in;margin-bottom:0in;margin-left:.5in;margin-bottom:.0001pt">To: Interoperability Documentation Help <a href="mailto:dochelp@microsoft.com"><dochelp@microsoft.com></a>; <a href="mailto:cifs-protocol@lists.samba.org">cifs-protocol@lists.samba.org</a><o:p></o:p></pre>
<pre style="mso-margin-top-alt:0in;margin-right:.5in;margin-bottom:0in;margin-left:.5in;margin-bottom:.0001pt">Subject: Question about DRS client behaviour with linked attributes<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre style="mso-margin-top-alt:0in;margin-right:.5in;margin-bottom:0in;margin-left:.5in;margin-bottom:.0001pt">Hi,<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre style="mso-margin-top-alt:0in;margin-right:.5in;margin-bottom:0in;margin-left:.5in;margin-bottom:.0001pt">We're trying to add DRS GET_TGT support to Samba and have a question about the behaviour of linked attributes. We noticed that you can sometimes get linked attributes that span a partition.<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre style="mso-margin-top-alt:0in;margin-right:.5in;margin-bottom:0in;margin-left:.5in;margin-bottom:.0001pt">For example you can have an object in the Configuration partition with a linked attribute to an object in the Domain partition:<o:p></o:p></pre>
<pre style="mso-margin-top-alt:0in;margin-right:.5in;margin-bottom:0in;margin-left:.5in;margin-bottom:.0001pt">dn:<o:p></o:p></pre>
<pre style="mso-margin-top-alt:0in;margin-right:.5in;margin-bottom:0in;margin-left:.5in;margin-bottom:.0001pt">CN=RWDC,CN=Servers,CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=SAMDOM,DC=EXAMPLE,DC=COM<o:p></o:p></pre>
<pre style="mso-margin-top-alt:0in;margin-right:.5in;margin-bottom:0in;margin-left:.5in;margin-bottom:.0001pt">serverReference: CN=RWDC,OU=Domain Controllers,DC=SAMDOM,DC=EXAMPLE,DC=COM<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre style="mso-margin-top-alt:0in;margin-right:.5in;margin-bottom:0in;margin-left:.5in;margin-bottom:.0001pt">And you can also have an object in the Domain partition with a linked attribute to an object in the Configuration partition:<o:p></o:p></pre>
<pre style="mso-margin-top-alt:0in;margin-right:.5in;margin-bottom:0in;margin-left:.5in;margin-bottom:.0001pt">dn: CN=RWDC,CN=Topology,CN=Domain System Volume,CN=DFSR-GlobalSettings,CN=System,DC=SAMDOM,DC=EXAMPLE,DC=COM<o:p></o:p></pre>
<pre style="mso-margin-top-alt:0in;margin-right:.5in;margin-bottom:0in;margin-left:.5in;margin-bottom:.0001pt">serverReference: CN=NTDS<o:p></o:p></pre>
<pre style="mso-margin-top-alt:0in;margin-right:.5in;margin-bottom:0in;margin-left:.5in;margin-bottom:.0001pt">Settings,CN=RWDC,CN=Servers,CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=SAMDOM,DC=EXAMPLE,DC=COM<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre style="mso-margin-top-alt:0in;margin-right:.5in;margin-bottom:0in;margin-left:.5in;margin-bottom:.0001pt">From what I could see from testing, when the DRS_GET_TGT flag is set in the ReplicateNCRequestMsg, Windows does not resolve a target object that is in another partition. <o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre style="mso-margin-top-alt:0in;margin-right:.5in;margin-bottom:0in;margin-left:.5in;margin-bottom:.0001pt">This results in a cyclical dependency between the partitions being replicated, E.g. you can't commit all the linked attributes in the Domain partition until all the objects in the Configuration partition have been received, but you can't commit all the linked attributes in the Configuration partition until all the objects in the Domain partition have been received. This problem could be resolved if you manage to replicate the target object before the link is replicated.<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre style="mso-margin-top-alt:0in;margin-right:.5in;margin-bottom:0in;margin-left:.5in;margin-bottom:.0001pt">My question is: how does the Windows replication behaviour resolve this problem?<o:p></o:p></pre>
<pre style="mso-margin-top-alt:0in;margin-right:.5in;margin-bottom:0in;margin-left:.5in;margin-bottom:.0001pt">- Does this mean the client always has to replicate the partitions in parallel? i.e. it can't replicate them in series because it can't commit an entire partition until it has received portions of another partition.<o:p></o:p></pre>
<pre style="mso-margin-top-alt:0in;margin-right:.5in;margin-bottom:0in;margin-left:.5in;margin-bottom:.0001pt">- What happens when the client encounters a linked attribute with an unknown target object? ProcessLinkValue() in the MS-DRSR seems to imply the client will ignore it (if it's already tried with GET_TGT). So how does the client ensure that it receives the linked attribute eventually?<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre style="mso-margin-top-alt:0in;margin-right:.5in;margin-bottom:0in;margin-left:.5in;margin-bottom:.0001pt">Thanks for your help.<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre style="mso-margin-top-alt:0in;margin-right:.5in;margin-bottom:0in;margin-left:.5in;margin-bottom:.0001pt">Tim<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
</blockquote>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>