From 292c99741d563765d5c09e70aa60bb6f0968c498 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Fri, 19 Dec 2008 12:15:33 +0000 Subject: * path.cc (path_conv::check): Handle incoming DOS paths non-POSIXy, always case-insensitive, always ignoring ACLs. --- winsup/cygwin/ChangeLog | 5 +++++ winsup/cygwin/path.cc | 10 +++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) (limited to 'winsup') diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 5869a722c..2b18c7d89 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +2008-12-19 Corinna Vinschen + + * path.cc (path_conv::check): Handle incoming DOS paths non-POSIXy, + always case-insensitive, always ignoring ACLs. + 2008-12-18 Corinna Vinschen * fhandler_disk_file.cc: Set 4th parameter of NtQueryDirectoryFile to diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc index 22deb5455..3b726c09a 100644 --- a/winsup/cygwin/path.cc +++ b/winsup/cygwin/path.cc @@ -1042,7 +1042,11 @@ is_virtual_symlink: { fileattr = sym.fileattr; path_flags = sym.pflags; - if (cygwin_shared->obcaseinsensitive || fs.caseinsensitive ()) + /* If the OS is caseinsensitive or the FS is caseinsensitive or + the incoming path was given in DOS notation, don't handle + path casesensitive. */ + if (cygwin_shared->obcaseinsensitive || fs.caseinsensitive () + || is_msdos) path_flags |= PATH_NOPOSIX; caseinsensitive = (path_flags & PATH_NOPOSIX) ? OBJ_CASE_INSENSITIVE : 0; @@ -1214,6 +1218,10 @@ out: /* FS has been checked already for existing files. */ if (exists () || fs.update (get_nt_native_path (), NULL)) { + /* Incoming DOS paths are treated like DOS paths in native + Windows applications. No ACLs, just default settings. */ + if (is_msdos) + fs.has_acls (false); debug_printf ("this->path(%s), has_acls(%d)", path, fs.has_acls ()); if (fs.has_acls ()) set_exec (0); /* We really don't know if this is executable or not here -- cgit v1.2.3