From 379598dd672d60b9f89d0b10d33b2f1859e7a024 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Fri, 1 Mar 2019 14:32:08 +0100 Subject: [PATCH] Cygwin: Disable creating case-sensitive folders by default Inspecting the content of case-sensitive directories on remote machines results in lots of errors like disappearing diretories and files, file not found, etc. This is not feasible as default behaviour Signed-off-by: Corinna Vinschen --- winsup/cygwin/fhandler_disk_file.cc | 7 +++++++ winsup/cygwin/release/3.0.2 | 8 ++++++++ winsup/doc/new-features.xml | 7 ++----- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/winsup/cygwin/fhandler_disk_file.cc b/winsup/cygwin/fhandler_disk_file.cc index 5a8463eff..193192762 100644 --- a/winsup/cygwin/fhandler_disk_file.cc +++ b/winsup/cygwin/fhandler_disk_file.cc @@ -1778,6 +1778,12 @@ fhandler_disk_file::mkdir (mode_t mode) pc.file_attributes (FILE_ATTRIBUTE_DIRECTORY); if (has_acls ()) set_created_file_access (dir, pc, mode & 07777); +#if 0 + /* FIXME: This default behaviour badly breaks interoperability. + Inspecting the content of case-sensitive directories + on remote machines results in lots of errors like + disappearing diretories and files, file not found, etc. */ + /* Starting with Windows 10 1803, try to create all dirs below the installation root as case-sensitive. If STATUS_NOT_SUPPORTED is returned, WSL isn't installed (unfortunately a requirement @@ -1808,6 +1814,7 @@ fhandler_disk_file::mkdir (mode_t mode) } } } +#endif NtClose (dir); res = 0; } diff --git a/winsup/cygwin/release/3.0.2 b/winsup/cygwin/release/3.0.2 index e24fe4e7c..d0a592b7c 100644 --- a/winsup/cygwin/release/3.0.2 +++ b/winsup/cygwin/release/3.0.2 @@ -5,6 +5,14 @@ What's new: What changed: ------------- +- Windows 10 1803 or later and WSL installed: + + Starting with 3.0.0, mkdir(2) automatically created directories within + the Cygwin installation dir as case sensitive. This badly breaks + interoperability with remote machines trying to access these dirs. + Therefore, disable this as default. You can still create case-sensitive + dirs via `chattr +C ...' + Bug Fixes --------- diff --git a/winsup/doc/new-features.xml b/winsup/doc/new-features.xml index ab369abb6..5bb410955 100644 --- a/winsup/doc/new-features.xml +++ b/winsup/doc/new-features.xml @@ -15,11 +15,8 @@ CLOCK_BOOTTIME_ALARM clocks. -Support for case sensitive directories. mkdir(2) automatically creates -directories within the Cygwin installation dir as case sensitive -now. - -This feature requires Windows 10 1803 or later and WSL installed! +Support for case sensitive directories via chattr(1). This feature requires +Windows 10 1803 or later and WSL installed.