4
0
mirror of git://sourceware.org/git/newlib-cygwin.git synced 2025-02-14 13:09:34 +08:00
Corinna Vinschen a44e09fd49 First cut of full implementation of new permission handling
* fhandler.cc (fhandler_base::open_with_arch): Call open with mode
        not umasked.
        (fhandler_base::open): Explicitely umask mode on NFS here.  Call new
        set_created_file_access rather than set_file_attribute.
        * fhandler_disk_file.cc (fhandler_disk_file::fchmod): Reimplement
        setting permissions on filesystems supporting ACLs using the new
        set_posix_access call.
        (fhandler_disk_file::fchown): Ditto.
        (fhandler_disk_file::mkdir): Call new set_created_file_access rather
        than set_file_attribute.
        * fhandler_socket.cc (fhandler_socket::bind): Don't umask here.  Add
        WRITE_OWNER access to allow writing group in case of SGID bit set.
        Call new set_created_file_access rather than set_file_attribute.
        * path.cc (symlink_worker): Call new set_created_file_access rather
        than set_file_attribute.
        * sec_acl.cc (searchace): Un-staticize.
        (set_posix_access): New, complementary functionality to
        get_posix_access.
        (setacl): Implement in terms of get_posix_access/set_posix_access.
        (get_posix_access): Add handling for just created files requiring
        their first Cygwin ACL.  Fix new_style recognition.  Handle SGID
        bit.  For old-style ACLs, ignore SYSTEM and Administrators when
        computing the {DEF_}CLASS_OBJ perms.
        * security.cc (get_file_sd): Revamp comment.  Change and (hopefully)
        speed up inheritance processing for just created files.
        (alloc_sd): Remove.
        (set_security_attribute): Call set_posix_access instead of alloc_sd.
        (get_object_attribute): Fix return value.
        (create_object_sd_from_attribute): Call set_posix_access instead of
        alloc_sd.
        (set_file_attribute): Remove.
        (set_created_file_access): New function implemented in terms of
        get_posix_access/set_posix_access.
        * security.h (set_file_attribute): Remove prototype.
        (set_created_file_access): Add prototype.
        (searchace): Ditto.
        (set_posix_access): Ditto.
        * syscalls.cc (open): Call open_with_arch with mode not umasked.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2015-04-10 11:39:15 +02:00

61 lines
2.2 KiB
Plaintext

What's new:
-----------
- New, unified implementation of POSIX permission and ACL handling. The
new ACLs now store the POSIX ACL MASK/CLASS_OBJ permission mask, and
they allow to inherit the S_ISGID bit. ACL inheritance now really
works as desired, in a limited, but theoretically equivalent fashion
even for non-Cygwin processes.
To accommodate Windows default ACLs, the new code ignores SYSTEM and
Administrators group permissions when computing the MASK/CLASS_OBJ
permission mask on old ACLs, and it doesn't deny access to SYSTEM and
Administrators group based on the value of MASK/CLASS_OBJ when
creating the new ACLs.
The new code now handles the S_ISGID bit on directories as on Linux:
Setting S_ISGID on a directory causes new files and subdirs created
within to inherit its group, rather than the primary group of the user
who created the file. This only works for files and directories
created by Cygwin processes.
- basename(3) now comes in two flavors, POSIX and GNU. The POSIX version is
the default. You get the GNU version after
#define _GNU_SOURCE
#include <string.h>
What changed:
-------------
- The maximum number of PTYs has been raised from 64 to 128.
Bug Fixes
---------
- Fix potential hang in pseudo ttys when generating ECHO output while the slave
is flooding the pty with output.
Addresses: https://cygwin.com/ml/cygwin/2015-03/msg00019.html
- Fix potential premature SIGHUP in pty code.
Addresses: https://cygwin.com/ml/cygwin/2015-03/msg00070.html
- Fix a name change from symlink to target name in calls to execvp, system, etc.
Addresses: https://cygwin.com/ml/cygwin/2015-03/msg00270.html
- Fix internal error in pty -ONLCR handling. Fix timing bug in pty OPOST
handling.
Addresses: https://cygwin.com/ml/cygwin/2015-02/msg00929.html
- Avoid creating passwd and group records from fully qualified Windows
account names (domain\name, name@domain).
Addresses: https://cygwin.com/ml/cygwin/2015-03/msg00528.html
- Avoid potential crash at startup or in getgroups(2).
Addresses: https://cygwin.com/ml/cygwin/2015-04/msg00010.html
- Fix UTF-16 surrogate handling in wctomb and friends.
Addresses: https://cygwin.com/ml/cygwin/2015-03/msg00452.html