Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2001-05-31 09:25:46 +0400
committerChristopher Faylor <me@cgf.cx>2001-05-31 09:25:46 +0400
commitecfb6f11bcfe614f890d7f9f5e6633b2178c45a4 (patch)
treefdc2f7012c9ff19d85b00b710af5ae84e7a3fe84 /winsup/cygwin/security.cc
parentb70261ef60e95d7d3db2b4246f2f7da932643d33 (diff)
* path.cc (chdir): Always send unsigned chars to isspace since newlib's isspace
doesn't deal well with "negative" chars. * fhandler.cc (fhandler_disk_file::open): Propagate remote status of file garnered from path_conv. Move #! checking to fstat. (fhandler_disk_file::fstat): Reorganize st_mode setting to eliminate duplication. Move check for #! here from fhandler::open. * fhandler.h (fhandler_base::isremote): New method. (fhandler_base::set_isremote): Ditto. (fhandler_base::set_execable_p): Also record "don't care if executable state". (fhandler_base::dont_care_if_execable): New method. * path.cc (path_conv::check): Clear new flags. Appropriately set vol_flags, drive_type, and is_remote_drive. * path.h: Add new flags and methods for manipulating them. * syscalls.cc (_unlink): Use isremote() to determine if a path is remote rather than calling GetDriveType. (stat_worker): Ditto. * security.cc (get_file_attribute): Or attribute with result of NTReadEA to be consistent with get_nt_attribute.
Diffstat (limited to 'winsup/cygwin/security.cc')
-rw-r--r--winsup/cygwin/security.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/winsup/cygwin/security.cc b/winsup/cygwin/security.cc
index 2a5749971..c618c0794 100644
--- a/winsup/cygwin/security.cc
+++ b/winsup/cygwin/security.cc
@@ -1199,7 +1199,9 @@ get_file_attribute (int use_ntsec, const char *file,
if (!attribute)
return 0;
+ int oatt = *attribute;
res = NTReadEA (file, ".UNIXATTR", (char *) attribute, sizeof (*attribute));
+ *attribute |= oatt;
/* symlinks are everything for everyone!*/
if ((*attribute & S_IFLNK) == S_IFLNK)
@@ -1523,8 +1525,7 @@ set_file_attribute (int use_ntsec, const char *file,
if (!use_ntsec || !allow_ntsec)
{
- if (!NTWriteEA (file, ".UNIXATTR",
- (char *) &attribute, sizeof (attribute)))
+ if (!NTWriteEA (file, ".UNIXATTR", (char *) &attribute, sizeof (attribute)))
{
__seterrno ();
return -1;