diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2004-05-11 15:39:50 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2004-05-11 15:39:50 +0000 |
commit | 0175b5311e921ddfb5f246eacc5c7c5e3b426e1b (patch) | |
tree | 7dfabc7ab2539c2710b5d89acd2582ae8e1e2079 /winsup/cygwin | |
parent | 75b5f30fdd7ba21f6ec05644113c45e065f6187c (diff) | |
download | newlib-0175b5311e921ddfb5f246eacc5c7c5e3b426e1b.zip newlib-0175b5311e921ddfb5f246eacc5c7c5e3b426e1b.tar.gz newlib-0175b5311e921ddfb5f246eacc5c7c5e3b426e1b.tar.bz2 |
* fhandler.cc (fhandler_base::open): Set file attributes to correct
value when creating files.
* path.h (class path_conv): Add write accessor for file_attributes.
Diffstat (limited to 'winsup/cygwin')
-rw-r--r-- | winsup/cygwin/ChangeLog | 6 | ||||
-rw-r--r-- | winsup/cygwin/fhandler.cc | 2 | ||||
-rw-r--r-- | winsup/cygwin/path.h | 1 |
3 files changed, 9 insertions, 0 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 97a7c38..885221d 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,5 +1,11 @@ 2004-05-10 Corinna Vinschen <corinna@vinschen.de> + * fhandler.cc (fhandler_base::open): Set file attributes to correct + value when creating files. + * path.h (class path_conv): Add write accessor for file_attributes. + +2004-05-10 Corinna Vinschen <corinna@vinschen.de> + * fhandler.h (class fhandler_socket): Add "owner" status flag. * fhandler_socket.cc (wait): Take flag parameter to take FD_OOB into account. Don't wait infinitely. diff --git a/winsup/cygwin/fhandler.cc b/winsup/cygwin/fhandler.cc index ae9bd8a..bcc4307 100644 --- a/winsup/cygwin/fhandler.cc +++ b/winsup/cygwin/fhandler.cc @@ -631,6 +631,8 @@ fhandler_base::open (int flags, mode_t mode) set_security_attribute (mode, &sa, sd); attr.SecurityDescriptor = sa.lpSecurityDescriptor; } + /* The file attributes are needed for later use in, e.g. fchmod. */ + pc.file_attributes (file_attributes); } status = NtCreateFile (&x, access, &attr, &io, NULL, file_attributes, shared, diff --git a/winsup/cygwin/path.h b/winsup/cygwin/path.h index c043660..396749b 100644 --- a/winsup/cygwin/path.h +++ b/winsup/cygwin/path.h @@ -201,6 +201,7 @@ class path_conv DWORD get_devn () {return dev.devn;} short get_unitn () {return dev.minor;} DWORD file_attributes () {return fileattr;} + void file_attributes (DWORD new_attr) {fileattr = new_attr;} DWORD drive_type () {return fs.drive_type ();} DWORD fs_flags () {return fs.flags ();} bool fs_has_ea () {return fs.has_ea ();} |