[PATCH] libcli: Overwrite destination in cli_smb2_rename

Jeremy Allison jra at samba.org
Tue Aug 5 12:47:55 MDT 2014


On Tue, Aug 05, 2014 at 06:42:16PM +0100, Ross Lagerwall wrote:
> Overwrite the destination in cli_smb2_rename by setting the
> ReplaceIfExists byte to TRUE.
> 
> Signed-off-by: Ross Lagerwall <rosslagerwall at gmail.com>
> ---
>  source3/libsmb/cli_smb2_fnum.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/source3/libsmb/cli_smb2_fnum.c b/source3/libsmb/cli_smb2_fnum.c
> index 3a04ea1..1c08f7f 100644
> --- a/source3/libsmb/cli_smb2_fnum.c
> +++ b/source3/libsmb/cli_smb2_fnum.c
> @@ -1910,6 +1910,7 @@ NTSTATUS cli_smb2_rename(struct cli_state *cli,
>  		goto fail;
>  	}
>  
> +	SCVAL(inbuf.data, 0, 0xFF);
>  	SIVAL(inbuf.data, 16, converted_size_bytes);
>  	memcpy(inbuf.data + 20, converted_str, converted_size_bytes);
>  
> -- 
> 2.0.3

I'd prefer SCVAL(inbuf.data, 0, 0x1), but other
than that LGTM. Reviewed-by: Jeremy Allison <jra at samba.org>

Can I get a second Team reviewer ?

Cheers,

	Jeremy.


More information about the samba-technical mailing list