[PATCH] Fix libsmb renaming over existing files

Stefan Metzmacher metze at samba.org
Mon Dec 12 20:24:06 UTC 2016


Am 12.12.2016 um 21:11 schrieb Stefan Metzmacher:
> Am 12.12.2016 um 19:56 schrieb Jeremy Allison:
>> On Mon, Dec 12, 2016 at 05:04:22PM +0100, Volker Lendecke wrote:
>>> Hi!
>>>
>>> Review appreciated!
>>
>> LGTM. Pushed with bug report id attached:
>>
>> https://bugzilla.samba.org/show_bug.cgi?id=12468
>>
>> as I think we need a back-port on this one.
>>
>> A question. There are other places in that file
>> where we also use smb2cli_query_info() but
>> don't set raw_status after an error.
>>
>> cli_smb2_qpathinfo_alt_name()
>> cli_smb2_qfileinfo_basic()
>> cli_smb2_qpathinfo_streams()
>> cli_smb2_dskattr()
>> cli_smb2_query_security_descriptor()
>> cli_smb2_get_ea_list_path()
>> cli_smb2_get_user_quota()
>> cli_smb2_list_user_quota_step()
>> cli_smb2_get_fs_quota_info()
>>
>> Shall I prepare an additional patch that sets
>> raw_status appropriately there also ?
> 
> The goal would be to remove cli->raw_status in future.
> 
> Until then I think it's better to catch this generically
> in the caller.
> 
> E.g. in cli_rename() and a lot of others we have the following
> pattern at the beginning:
> 
>         if (smbXcli_conn_protocol(cli->conn) >= PROTOCOL_SMB2_02) {
>                 return cli_smb2_rename(cli,
>                                         fname_src,
>                                         fname_dst);
>         }
> 
> I think we should change this to:
> 
>         if (smbXcli_conn_protocol(cli->conn) >= PROTOCOL_SMB2_02) {
>                 cli->raw_status = cli_smb2_rename(cli,
>                                         fname_src,
>                                         fname_dst);
> 		return cli->raw_status;
>         }
> 
> 
> Otherwise we'll miss a lot of places within the cli_smb2_* functions
> where we miss to set cli->raw_status.

BTW: I'm currently trying to check if we could change the
client max protocol default to SMB3, see
https://git.samba.org/?p=metze/samba/wip.git;a=commitdiff;h=48db557d8f826a5fb8f34139fb54d0c57312b579
https://git.samba.org/?p=metze/samba/wip.git;a=commitdiff;h=e8f6b8cdc586fcf0137594e16cdd4264b412eb86

I'll report tomorrow how the private autobuild went.

metze

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20161212/8c2d7134/signature.sig>


More information about the samba-technical mailing list