Using smbclient and libsmbclient on CentOS 7. When trying to rename a directory to a single character name in the root of a share it fails with NT_STATUS_INFO_LENGTH_MISMATCH smb: \> rename ZZZ Z NT_STATUS_INFO_LENGTH_MISMATCH renaming files \ZZZ -> \Z The same operation in a subfolder is fine:- smb: \> rename ZZZ\Test ZZZ\T
This work in current master. Which Samba version are you using? Also, any special smb.conf settings? Please share your smb.conf.
This is the latest version of smbclient available through the CentOS repos. smbclient -V ...reports... Version 4.10.4 yum info samba-client ...reports... Name : samba-client Arch : x86_64 Version : 4.10.4 Release : 11.el7_8 smb.conf is just defaults. File server is Windows 2008.
this does not happen with Samba on the server side but it actually happens with Windows on the server side. Here is smbclient 4.12.2 against Win 7: smb: \> mkdir ZZZ smb: \> rename ZZZ Z NT_STATUS_INFO_LENGTH_MISMATCH renaming files \ZZZ -> \Z smb: \> rename ZZZ ZZ smb: \>
Taking a look at this and it's repeatable, but very strange.. I need to get a trace from a Windows client doing the same thing I think.
Created attachment 16100 [details] raw patch for master. This fixes the problem here. Looks to me like Windows server has a problem in that it complains if the SMB_FILE_RENAME_INFORMATION buffer size is less than 24 bytes. I'll take a look in the protocol spec docs to see if this is documented anywhere.
(In reply to Björn Jacke from comment #3) Björn, can you check the patch I just uploaded ? Not sure how to write a test for this as it's a restriction that Windows server seems to have that we don't.
(In reply to Jeremy Allison from comment #6) works ! :) (tested with 2012 R2, where it also failed before)
Created attachment 16103 [details] git-am fix for 4.12.next, 4.11.next. Cherry-pick from master. Applies cleanly to 4.12.next, 4.11.next.
Reassigning to Karolin for inclusion in 4.11 and 4.12.
(In reply to Ralph Böhme from comment #9) Pushed to autobuild-v4-{12,11}-test.
(In reply to Karolin Seeger from comment #10) Pushed to both branches. Closing out bug report. Thanks!