summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/fhandler.cc
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2004-04-20 15:51:24 +0000
committerCorinna Vinschen <corinna@vinschen.de>2004-04-20 15:51:24 +0000
commitc8daf9983b445c9a2a0238af2d6e3ae23d0f3411 (patch)
treef836ae20b5aa189f864d6448c7a205c6ba7e7fc2 /winsup/cygwin/fhandler.cc
parent4cc12c56301d5092226264aa294674f17640448e (diff)
downloadcygnal-c8daf9983b445c9a2a0238af2d6e3ae23d0f3411.tar.gz
cygnal-c8daf9983b445c9a2a0238af2d6e3ae23d0f3411.tar.bz2
cygnal-c8daf9983b445c9a2a0238af2d6e3ae23d0f3411.zip
* fhandler_disk_file.cc (fhandler_base::open_fs): Change
set_file_attribute call to indicate that NT security isn't used. (fhandler_disk_file::fchmod): Rearrange to isolate 9x related statements. Do not set FILE_ATTRIBUTE_SYSTEM. (fhandler_disk_file::fchown): Check noop case first. * fhandler.cc (fhandler_base::open9x): Remove ntsec related statements. (fhandler_base::set_name): Do not set namehash. * fhandler.h (fhandler_base::get_namehash): Compute and set namehash if needed. * syscalls.cc (access): Verify that fh is not NULL. Do not set PC_FULL. (chmod): Ditto. (chown_worker): Ditto. (stat_worker): Ditto. Verify if the path exists.
Diffstat (limited to 'winsup/cygwin/fhandler.cc')
-rw-r--r--winsup/cygwin/fhandler.cc9
1 files changed, 1 insertions, 8 deletions
diff --git a/winsup/cygwin/fhandler.cc b/winsup/cygwin/fhandler.cc
index 9aa3c0d4a..1d9f42c9c 100644
--- a/winsup/cygwin/fhandler.cc
+++ b/winsup/cygwin/fhandler.cc
@@ -152,7 +152,6 @@ fhandler_base::set_name (path_conv &in_pc)
{
memcpy (&pc, &in_pc, in_pc.size ());
pc.set_normalized_path (in_pc.normalized_path);
- namehash = hash_path_name (0, get_win32_name ());
}
/* Detect if we are sitting at EOF for conditions where Windows
@@ -435,7 +434,6 @@ fhandler_base::open_9x (int flags, mode_t mode)
int shared;
int creation_distribution;
SECURITY_ATTRIBUTES sa = sec_none;
- security_descriptor sd;
syscall_printf ("(%s, %p)", get_win32_name (), flags);
@@ -492,17 +490,12 @@ fhandler_base::open_9x (int flags, mode_t mode)
if (!(mode & (S_IWUSR | S_IWGRP | S_IWOTH)))
file_attributes |= FILE_ATTRIBUTE_READONLY;
- /* If the file should actually be created and ntsec is on,
- set files attributes. */
- if (flags & O_CREAT && get_device () == FH_FS && allow_ntsec && has_acls ())
- set_security_attribute (mode, &sa, sd);
-
x = CreateFile (get_win32_name (), access, shared, &sa, creation_distribution,
file_attributes, 0);
if (x == INVALID_HANDLE_VALUE)
{
- if (!wincap.can_open_directories () && pc.isdir ())
+ if (pc.isdir ())
{
if (flags & (O_CREAT | O_EXCL) == (O_CREAT | O_EXCL))
set_errno (EEXIST);