<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from text --><style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<meta content="text/html; charset=utf-8">
<meta name="x_Generator" content="Microsoft Word 15 (filtered medium)">
<style>
<!--
@font-face
        {font-family:"Cambria Math"}
@font-face
        {font-family:Calibri}
p.x_MsoNormal, li.x_MsoNormal, div.x_MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif}
a:x_link, span.x_MsoHyperlink
        {color:blue;
        text-decoration:underline}
a:x_visited, span.x_MsoHyperlinkFollowed
        {color:#954F72;
        text-decoration:underline}
.x_MsoChpDefault
        {}
@page WordSection1
        {margin:1.0in 1.0in 1.0in 1.0in}
div.x_WordSection1
        {}
-->
</style>
<div lang="EN-US" link="blue" vlink="#954F72">
<div class="x_WordSection1">
<p class="x_MsoNormal">Thank you for the update, Jeremy!</p>
<p class="x_MsoNormal"> </p>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> Jeremy Allison <jra@samba.org><br>
<b>Sent:</b> Friday, October 20, 2017 2:10:12 PM<br>
<b>To:</b> Andreas Schneider<br>
<b>Cc:</b> Interoperability Documentation Help; cifs-protocol@lists.samba.org<br>
<b>Subject:</b> Re: [cifs-protocol] SMB2 File Rename</font>
<div> </div>
</div>
</div>
<font size="2"><span style="font-size:10pt;">
<div class="PlainText">On Fri, Oct 20, 2017 at 03:21:27PM +0200, Andreas Schneider via cifs-protocol wrote:<br>
> Hello,<br>
> <br>
> I disovered that a file rename operation (SetInfo with <br>
> FILE_RENAME_INFORMATION_TYPE_2) fails for a SMB3 connection but works for <br>
> SMB1.<br>
> <br>
> I've run smbclient from Samba again Windows 2012:<br>
> <br>
> File rename (move) over SMB1 with smbclient:<br>
> <br>
> bin/smbclient //win-dc02.earth.milkyway.site/Test -Ubob1%Secret007! -mNT1<br>
> Try "help" to get a list of possible commands.<br>
> smb: \> cd dir1<br>
> smb: \dir1\> rename README ..\dir2\README<br>
> smb: \dir1\><br>
> <br>
> This works!<br>
> <br>
> File rename (move) over SMB3 with smbclient:<br>
> <br>
> bin/smbclient //win-dc02.earth.milkyway.site/Test -Ubob1%Secret007! -mSMB3<br>
> Try "help" to get a list of possible commands.<br>
> smb: \> cd dir1<br>
> smb: \dir1\> rename README ..\dir2\README<br>
> NT_STATUS_OBJECT_NAME_NOT_FOUND renaming files \dir1\README -> \dir1\..<br>
> \dir2\README <br>
> smb: \dir1\><br>
> <br>
> As you can see, it fails with NT_STATUS_OBJECT_NAME_NOT_FOUND.<br>
> <br>
> I do not see that we're doing anything wrong in the SetInfo request. The doc <br>
> does not mention that '..' is not allowed.<br>
> <br>
> Is a path of dir1\..\dir2\file not allowed?<br>
<br>
Just a quick follow up after research. In MS-FCC.pdf it<br>
states:<br>
<br>
2.1.5.1 Dot Directory Names<br>
The pathname components of "." (single period) and ".." (two periods) are reserved as dot directory<br>
names.<br>
Except where explicitly permitted, a pathname component that is a dot directory name MUST NOT be<br>
sent over the wire.<br>
<br>
so it looks like for SMB2 the server is expecting the<br>
client to canonicalize out all "." and ".." names before<br>
use.<br>
<br>
Jeremy.<br>
</div>
</span></font>
</body>
</html>