diff --git a/source3/include/vfs.h b/source3/include/vfs.h index 77a967151d0..210a726bcf7 100644 --- a/source3/include/vfs.h +++ b/source3/include/vfs.h @@ -690,6 +690,7 @@ typedef struct files_struct { #define TCON_FLAG_STAT_FAILED 0x01 #define TCON_FLAG_STREAMS_XATTR 0x02 #define TCON_FLAG_STREAMS_FILE 0x04 +#define TCON_FLAG_CASE_INSENSTIVE_FS 0x08 #define FSP_POSIX_FLAGS_OPEN 0x01 #define FSP_POSIX_FLAGS_RENAME 0x02 diff --git a/source3/modules/vfs_zfs_core.c b/source3/modules/vfs_zfs_core.c index d7141efee05..5638bf057b9 100644 --- a/source3/modules/vfs_zfs_core.c +++ b/source3/modules/vfs_zfs_core.c @@ -729,6 +729,10 @@ static int zfs_core_connect(struct vfs_handle_struct *handle, return ret; } + if (config->ds->properties->casesens == SMBZFS_INSENSITIVE) { + handle->conn->internal_tcon_flags |= TCON_FLAG_CASE_INSENSTIVE_FS; + } + base_quota_str = lp_parm_const_string(SNUM(handle->conn), "zfs_core", "base_user_quota", NULL); diff --git a/source3/smbd/smb2_reply.c b/source3/smbd/smb2_reply.c index f1e0f2f4fcc..064513f8624 100644 --- a/source3/smbd/smb2_reply.c +++ b/source3/smbd/smb2_reply.c @@ -1544,7 +1544,8 @@ NTSTATUS rename_internals_fsp(connection_struct *conn, * don't do the rename, just return success. */ - if (strcsequal(fsp->fsp_name->base_name, smb_fname_dst->base_name) && + if ((conn->internal_tcon_flags & TCON_FLAG_CASE_INSENSTIVE_FS) == 0 && + strcsequal(fsp->fsp_name->base_name, smb_fname_dst->base_name) && strcsequal(fsp->fsp_name->stream_name, smb_fname_dst->stream_name)) { DEBUG(3, ("rename_internals_fsp: identical names in rename %s "