aboutsummaryrefslogtreecommitdiff
path: root/winsup
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2006-11-29 13:23:24 +0000
committerCorinna Vinschen <corinna@vinschen.de>2006-11-29 13:23:24 +0000
commitc69dd1e9b3227c70fdb5c9e972da2d5b966d4965 (patch)
tree38a4e9bfccf0dc3f69892e7190cf949fec8affc1 /winsup
parent931d191bc9f99915d1660f31501f1be8339fef73 (diff)
downloadnewlib-c69dd1e9b3227c70fdb5c9e972da2d5b966d4965.zip
newlib-c69dd1e9b3227c70fdb5c9e972da2d5b966d4965.tar.gz
newlib-c69dd1e9b3227c70fdb5c9e972da2d5b966d4965.tar.bz2
2006-11-28 Corinna Vinschen <corinna@vinschen.de>
* security.cc (create_token): Revert erroneous change to test subauth_token for INVAILD_HANDLE_VALUE. * syscalls.cc (seteuid32): Set create_token's subauth_token parameter back to NULL. 2006-11-28 Corinna Vinschen <corinna@vinschen.de> * fhandler.cc (fhandler_base::open): Fix previous patch to handle the SYSTEM attribute as well. 2006-11-27 Christopher Faylor <cgf@timesys.com> * include/cygwin/signal.h: Add __extension__ to various anonymous unions and structs. (thanks to V.Haisman)
Diffstat (limited to 'winsup')
-rw-r--r--winsup/cygwin/ChangeLog17
-rw-r--r--winsup/cygwin/fhandler.cc8
-rw-r--r--winsup/cygwin/include/cygwin/signal.h8
3 files changed, 29 insertions, 4 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index c012241..4a21fa2 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,20 @@
+2006-11-28 Corinna Vinschen <corinna@vinschen.de>
+
+ * security.cc (create_token): Revert erroneous change to test
+ subauth_token for INVAILD_HANDLE_VALUE.
+ * syscalls.cc (seteuid32): Set create_token's subauth_token parameter
+ back to NULL.
+
+2006-11-28 Corinna Vinschen <corinna@vinschen.de>
+
+ * fhandler.cc (fhandler_base::open): Fix previous patch to handle the
+ SYSTEM attribute as well.
+
+2006-11-27 Christopher Faylor <cgf@timesys.com>
+
+ * include/cygwin/signal.h: Add __extension__ to various anonymous
+ unions and structs. (thanks to V.Haisman)
+
2006-11-14 Corinna Vinschen <corinna@vinschen.de>
* include/cygwin/version.h: Bump DLL minor version number to 23.
diff --git a/winsup/cygwin/fhandler.cc b/winsup/cygwin/fhandler.cc
index 7a04c83..fe5568c 100644
--- a/winsup/cygwin/fhandler.cc
+++ b/winsup/cygwin/fhandler.cc
@@ -661,6 +661,14 @@ fhandler_base::open (int flags, mode_t mode)
if ((c && c[1] == '.') || *get_win32_name () == '.')
file_attributes |= FILE_ATTRIBUTE_HIDDEN;
#endif
+ /* Starting with Windows 2000, when trying to overwrite an already
+ existing file with FILE_ATTRIBUTE_HIDDEN and/or FILE_ATTRIBUTE_SYSTEM
+ attribute set, CreateFile fails with ERROR_ACCESS_DENIED.
+ Per MSDN you have to create the file with the same attributes as
+ already specified for the file. */
+ if (has_attribute (FILE_ATTRIBUTE_HIDDEN | FILE_ATTRIBUTE_SYSTEM))
+ file_attributes |= pc.file_attributes ();
+
/* If the file should actually be created and ntsec is on,
set files attributes. */
if (allow_ntsec && has_acls ())
diff --git a/winsup/cygwin/include/cygwin/signal.h b/winsup/cygwin/include/cygwin/signal.h
index 1061a7a..304f62b 100644
--- a/winsup/cygwin/include/cygwin/signal.h
+++ b/winsup/cygwin/include/cygwin/signal.h
@@ -81,7 +81,7 @@ struct _sigcommune
void *_si_read_handle;
void *_si_write_handle;
void *_si_process_handle;
- union
+ __extension__ union
{
int _si_fd;
void *_si_pipe_fhandler;
@@ -97,7 +97,7 @@ typedef struct
uid_t si_uid; /* sender's uid */
int si_errno; /* errno associated with signal */
- union
+ __extension__ union
{
__uint32_t __pad[32]; /* plan for future growth */
struct _sigcommune _si_commune; /* cygwin ipc */
@@ -120,7 +120,7 @@ typedef struct
};
/* SIGCHLD */
- struct
+ __extension__ struct
{
int si_status; /* exit code */
clock_t si_utime; /* user time */
@@ -194,7 +194,7 @@ typedef void (*_sig_func_ptr)(int);
struct sigaction
{
- union
+ __extension__ union
{
_sig_func_ptr sa_handler; /* SIG_DFL, SIG_IGN, or pointer to a function */
void (*sa_sigaction) ( int, siginfo_t *, void * );