[PATCH] libcli: Overwrite destination in cli_smb2_rename
jra at samba.org
Tue Aug 5 15:37:10 MDT 2014
On Tue, Aug 05, 2014 at 02:31:18PM -0700, Jeremy Allison wrote:
> On Tue, Aug 05, 2014 at 02:27:44PM -0700, Jeremy Allison wrote:
> > which is what we want for libsmbclient really :-(.
> > SMB1 has several methods of renaming, the NTTrans
> > rename overwrites the destination by default.
> Ah, no - checked more carefully and no it
> doesn't :-(.
> Inside smbd for NTTrans rename we call:
> status = rename_internals(ctx, conn, req,
> smb_fname_old, smb_fname_new,
> attrs, False, src_has_wcard,
> where the 'False' bool is the 'replace_if_exists'
> parameter. So we return NT_STATUS_OBJECT_NAME_COLLISION
> in this case.
> Sorry for the mistake :-(. Yep, looks like we
> can't use this in SMB1.
However.... (email thinking in real-time here :-).
SMB1 trans2 SMB_FILE_RENAME_INFORMATION *does*
have a client supplied replace_if_exists flag,
the same as SMB2. So we could move to that
More information about the samba-technical