This is the mail archive of the
cygwin-patches@cygwin.com
mailing list for the Cygwin project.
[Patch]: fs_info::update
- From: "Pierre A. Humblet" <pierre at phumblet dot no-ip dot org>
- To: cygwin-patches at cygwin dot com
- Date: Thu, 27 Jan 2005 21:58:09 -0500
- Subject: [Patch]: fs_info::update
When a user has no read access to the root of a drive, GetVolumeInformation
fails and has_acls is left unset. Consequently ntsec is off on that drive.
If a user "chmod -r" the root of a drive, ntsec is turned off and "chmod +r"
has no effect.
The patch does its best to set has_acls even in case of failure.
2005-01-28 Pierre Humblet <pierre.humblet@ieee.org>
* path.cc (fs_info::update) Set has_acls even in case of failure.
Index: path.cc
===================================================================
RCS file: /cvs/src/src/winsup/cygwin/path.cc,v
retrieving revision 1.340
diff -u -p -r1.340 path.cc
--- path.cc 26 Jan 2005 04:34:19 -0000 1.340
+++ path.cc 28 Jan 2005 02:48:54 -0000
@@ -381,6 +381,8 @@ fs_info::update (const char *win32_path)
debug_printf ("Cannot get volume information (%s), %E", root_dir);
has_buggy_open (false);
has_ea (false);
+ has_acls (GetLastError () == ERROR_ACCESS_DENIED
+ && (allow_smbntsec || !is_remote_drive ()));
flags () = serial () = 0;
return false;
}