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>2003-02-21 07:33:53 +0300
committerChristopher Faylor <me@cgf.cx>2003-02-21 07:33:53 +0300
commit5cd8241242bc4635d4bf06fb65c8071ca8802c5d (patch)
treea4cef03932730e67c521a8165007fb06b4bdb751 /winsup/cygwin/fhandler_disk_file.cc
parentd4806224b6a673a9d7a73d7849721852b7b77f47 (diff)
* fhandler.cc (fhandler_base::open): Move some filesystem specific stuff.
(fhandler_disk_file::open): Accept some filesystem specific stuff. * sigproc.cc (wait_for_sigthread): Become slightly more thread safe. (sig_send): Don't assume that signal thread is ready.
Diffstat (limited to 'winsup/cygwin/fhandler_disk_file.cc')
-rw-r--r--winsup/cygwin/fhandler_disk_file.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/winsup/cygwin/fhandler_disk_file.cc b/winsup/cygwin/fhandler_disk_file.cc
index bec3c3eac..81ea8f27c 100644
--- a/winsup/cygwin/fhandler_disk_file.cc
+++ b/winsup/cygwin/fhandler_disk_file.cc
@@ -400,6 +400,14 @@ fhandler_disk_file::open (path_conv *real_path, int flags, mode_t mode)
return 0;
}
+ /* Attributes may be set only if a file is _really_ created.
+ This code is now only used for ntea here since the files
+ security attributes are set in CreateFile () now. */
+ if (flags & O_CREAT
+ && GetLastError () != ERROR_ALREADY_EXISTS
+ && !allow_ntsec && allow_ntea)
+ set_file_attribute (has_acls (), get_win32_name (), mode);
+
/* Set newly created and truncated files as sparse files. */
if ((real_path->fs_flags () & FILE_SUPPORTS_SPARSE_FILES)
&& (get_access () & GENERIC_WRITE) == GENERIC_WRITE