<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=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (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:11.0pt;
        font-family:"Calibri","sans-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;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
span.EmailStyle19
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.EmailStyle20
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.EmailStyle21
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.EmailStyle22
        {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 lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="color:#1F497D">I reviewed your Server 2003 trace and verified that it does return 0x000003e5 (#define ERROR_IO_PENDING 997L).&nbsp; I will add this to the request for a behavior note.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Bryan<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<div>
<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;"> Bryan Burgin
<br>
<b>Sent:</b> Wednesday, September 29, 2010 3:55 PM<br>
<b>To:</b> 'mat@samba.org'; Hongwei Sun<br>
<b>Cc:</b> MSSolve Case Email; cifs-protocol@samba.org; Nick Meier; pfif@tridgell.net<br>
<b>Subject:</b> RE: [REG:110092975377470] &quot;Issue 2&quot; (was &quot;Summary of [MS-BKRP] 3.1.4.1.4 BACKUPKEY_RESTORE_GUID issues&quot;)<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal"><span style="color:#1F497D">[Merging threads]<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">[Adding <a href="mailto:cifs-protocol@samba.org">
cifs-protocol@samba.org</a>; Nick Meier &nbsp;<a href="mailto:pfif@tridgell.net">pfif@tridgell.net</a>]<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Matthieu,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Regarding this issue on a separate thread, you added:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="color:#1F497D">&#8220;Bryan do you remember with which server do we have this ? because today with a w2k8 server I keep receiving WERR_IO_PENDING (0x000003E5) It seems to be w2k8r2 (for ERROR_INVALID_DATA).
 In fact it seems that we have IO_PENDING up to w2k8 included and then INVALID_DATA.&#8221;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">We were using Server 2008 R2.&nbsp; Can you get a TT Trace with Server 2008 SP2 that shows WERR_IO_PENDING (0x000003E5) and I&#8217;ll add that as a Windows behavior after researching the issue?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">As an implementer of the protocol, you should return ERROR_FILE_NOT_FOUND (2), as is recommended in the specification:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="color:#1F497D">[MS-BKRP] 3.1.4.1.4 Step 1:<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="color:#1F497D">&quot;Retrieve the ClientWrap key pair corresponding to the GUID specified by the guidKey field. If the key pair cannot be retrieved, the server MUST return an appropriate nonzero error code.
 The error code returned SHOULD be equal to ERROR_FILE_NOT_FOUND (0x2).&quot;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Bryan<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<div>
<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;"> Bryan Burgin
<br>
<b>Sent:</b> Wednesday, September 29, 2010 3:36 PM<br>
<b>To:</b> 'mat@samba.org'; Hongwei Sun<br>
<b>Cc:</b> MSSolve Case Email<br>
<b>Subject:</b> [REG:110092975377470] &quot;Issue 2&quot; (was &quot;Summary of [MS-BKRP] 3.1.4.1.4 BACKUPKEY_RESTORE_GUID issues&quot;)<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal">Matthieu,<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">Regarding &#8220;Issue 2&#8221; (see mail below), I was able to verify that Server 2008 R2 does return ERROR_INVALID_DATA 0xd (14) in this scenario instead of the recommended ERROR_FILE_NOT_FOUND (0x2).&quot;&nbsp; I filed a request with the product group to
 document that Server 2008 R2.<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">The function that actually discovers the error properly returns STATUS_OBJECT_NAME_NOT_FOUND ((NTSTATUS)0xC0000034L) to its immediate caller, but does not call SetLastError().&nbsp; The failure rolls back to previous callers as a Boolean fail/succeed
 instead of passing back the NTSTATUS code.&nbsp; A middle-level function knows that there was a failure (based on the Boolean that was passed back) and calls GetLastError() to determine its cause.&nbsp; Since the Last Error was never set, that comes back as zero (STATUS_SUCCESS).&nbsp;
 Since the middle-level function doesn&#8217;t have an exact cause, it falls back to returning ERROR_INVALID_DATA (0xd).&nbsp; STATUS_OBJECT_NAME_NOT_FOUND ((NTSTATUS) 0xC0000034L), which would map to the Win32 error ERROR_FILE_NOT_FOUND (0x2), never gets communicated.<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">Our repro was with Server 2008 R2.&nbsp; I suspect that this is the same across all the server versions.<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">I recommended the behavior note:<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal" style="margin-left:.5in">[MS-BKRP] 3.1.4.1.4 Step 1:<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal" style="margin-left:.5in">&quot;Retrieve the ClientWrap key pair corresponding to the GUID specified by the guidKey field. If the key pair cannot be retrieved, the server MUST return an appropriate nonzero error code. The error code returned
 SHOULD be equal to ERROR_FILE_NOT_FOUND (0x2). &lt;nn&gt;&quot;<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal" style="margin-left:.5in">&quot;&lt;nn&gt; Windows Server 2008 R2 (and others) return ERROR_INVALID_DATA (0x0000000D).&quot;<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">If accepted, it will show up in a future update to MS-BKRP.<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">Bryan<span style="color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<div>
<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;"> Bryan Burgin
<br>
<b>Sent:</b> Tuesday, September 28, 2010 11:35 AM<br>
<b>To:</b> 'mat@samba.org'; Hongwei Sun<br>
<b>Subject:</b> Summary of [MS-BKRP] 3.1.4.1.4 BACKUPKEY_RESTORE_GUID issues<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">Matthieu,<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal"><span style="color:#1F497D">[&#8230;]</span><o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">ISSUE TWO<o:p></o:p></p>
<p class="MsoNormal">===========<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">x64 08R2 TTTrace at C:\CustomerFiles\Samba_backupkey\lsass03.run<o:p></o:p></p>
<p class="MsoNormal">Issue: BACKUPKEY_RESTORE_GUID step #1:<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">&nbsp;&nbsp;&nbsp; &quot;Retrieve the ClientWrap key pair corresponding to the GUID specified by the guidKey field.<o:p></o:p></p>
<p class="MsoNormal">&nbsp;&nbsp;&nbsp; If the key pair cannot be retrieved, the server MUST return an appropriate nonzero error<o:p></o:p></p>
<p class="MsoNormal">&nbsp;&nbsp;&nbsp; code. The error code returned SHOULD be equal to ERROR_FILE_NOT_FOUND (0x2).&quot;<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">Expecting ERROR_FILE_NOT_FOUND 0x2 (2)<o:p></o:p></p>
<p class="MsoNormal">Receiving ERROR_INVALID_DATA 0xd (14)<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
</body>
</html>