This is what Windows returns for this case.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13688
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit
276c5bd851ab6ab818a49d9c47f6b96de8024778)
static NTSTATUS can_rename(connection_struct *conn, files_struct *fsp,
uint16_t dirtype)
{
+ if (fsp->fsp_name->twrp != 0) {
+ /* Get the error right, this is what Windows returns. */
+ return NT_STATUS_NOT_SAME_DEVICE;
+ }
+
if (!CAN_WRITE(conn)) {
return NT_STATUS_MEDIA_WRITE_PROTECTED;
}