diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2001-07-09 09:02:41 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2001-07-09 09:02:41 +0000 |
commit | 5d0cbc17db4a311d723aaa4760194f0c85de98ed (patch) | |
tree | eab1affa60d7952565b5420e338eb884f756723f /winsup/cygwin | |
parent | 6e06cb0d32cbbc18181dc9dba606facf36f395b1 (diff) | |
download | newlib-5d0cbc17db4a311d723aaa4760194f0c85de98ed.zip newlib-5d0cbc17db4a311d723aaa4760194f0c85de98ed.tar.gz newlib-5d0cbc17db4a311d723aaa4760194f0c85de98ed.tar.bz2 |
* security.cc (alloc_sd): Don't set inheritance attribute for
permissions given to directories.
Diffstat (limited to 'winsup/cygwin')
-rw-r--r-- | winsup/cygwin/ChangeLog | 5 | ||||
-rw-r--r-- | winsup/cygwin/security.cc | 16 |
2 files changed, 21 insertions, 0 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 39a15c1..ea185c9 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +Mon Jul 9 10:05:00 2001 Corinna Vinschen <corinna@vinschen.de> + + * security.cc (alloc_sd): Don't set inheritance attribute for + permissions given to directories. + Thu Jun 28 22:19:08 2001 Christopher Faylor <cgf@cygnus.com> * fhandler_dsp.cc (fhandler_dev_dsp::ioctl): Return 0 for success. diff --git a/winsup/cygwin/security.cc b/winsup/cygwin/security.cc index 4971686..0a843c7 100644 --- a/winsup/cygwin/security.cc +++ b/winsup/cygwin/security.cc @@ -1398,7 +1398,23 @@ alloc_sd (uid_t uid, gid_t gid, const char *logsrv, int attribute, group_deny &= ~(STANDARD_RIGHTS_READ | FILE_READ_ATTRIBUTES | FILE_READ_EA); /* Construct appropriate inherit attribute. */ + /* TODO */ +#if 0 + /* Inheriting of attributes result in some strange behaviour if + a user creates files in directories which are owned by another + user. Even if the creator has all permissions, the default + permissions of created files are set according to the dirs + permission bits which may result in the inability to chmod + the own file. + Even if not inheriting permissions seems to be the correct + behaviour from the POSIX point of view, I'll keep that + stuff in the sources if it turns out that native Windows + processes are failing due to this change. + */ DWORD inherit = (attribute & S_IFDIR) ? INHERIT_ALL : DONT_INHERIT; +#else + DWORD inherit = DONT_INHERIT; +#endif /* Set deny ACE for owner. */ if (owner_deny |