I want to use SMBLibrary to rename files on a SMBServer. Sometimes the new name for the files only consists of one character, which leads to a total SetInfo Request of 22 bytes. The SMB2 protocol needs the SetInfo Request always to have at least 24 bytes. Therefore, a padding field should exist in the request.
I think that should be solved by checking if the new filename has only a length of 1. If that is the case, the Length property in FileRenameInformationType2 has to be 24 and the requests need to extra bytes.
Hi,
I want to use
SMBLibrary
to rename files on aSMBServer
. Sometimes the new name for the files only consists of one character, which leads to a totalSetInfo Request
of 22 bytes. The SMB2 protocol needs theSetInfo Request
always to have at least 24 bytes. Therefore, a padding field should exist in the request.See: https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-fscc/52aa0b70-8094-4971-862d-79793f41e6a8
I think that should be solved by checking if the new filename has only a length of 1. If that is the case, the
Length
property inFileRenameInformationType2
has to be 24 and the requests need to extra bytes.