libc/winsup/cygwin/release/2.4.0
Corinna Vinschen a10d969231 Return unique inode numbers when calling stat/fstat on pipes and IP sockets
* fhandler.h (class fhandler_base): Convert unique_id to int64_t.
        (fhandler_base::set_ino): New protected inline method.
        (fhandler_base::get_unique_id): Convert to int64_t.
        (fhandler_base::set_unique_id): New inline method taking int64_t.
        (fhandler_pipe::fstat): Declare.
        (fhandler_pipe::init): Take extra parameter.
        (fhandler_pipe::create): Ditto.
        * fhandler_socket.cc (fhandler_socket::init_events): Set inode number
        to serial number.
        (fhandler_socket::fstat): Set device to DEV_TCP_MAJOR.  Create st_ino
        from get_ino.
        * include/cygwin/signal.h (struct _sigcommune): Replace
        _si_pipe_fhandler with _si_pipe_unique_id.
        * pinfo.h (_pinfo::pipe_fhandler): Take unique id instead of HANDLE.
        * pinfo.cc (commune_process): Accommodate change to _si_pipe_unique_id.
        (_pinfo::commune_request): Ditto.
        (_pinfo::pipe_fhandler): Ditto.
        * pipe.cc (fhandler_pipe::init): Take unique id as argument and set
        inode number and unique_id from there.
        (fhandler_pipe::open): Rework to find any matching pipe from unique
        id in filename.
        (fhandler_pipe::get_proc_fd_name): Create filename using inode number.
        (fhandler_pipe::create): Generate and return unique id from process pid
        and pipe_unique_id.  In outer method, call init with additional unique
        id as parameter.
        (fhandler_pipe::fstat): New method.
        (pipe_worker): Accommodate using 64 bit inode number in filename.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2016-01-11 12:35:41 +01:00

87 lines
3.6 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 standard Windows ACLs, the POSIX permissions of the
owner and all other users in the ACL are computed using the Windows
AuthZ API. This may slow down the computation of POSIX permissions
noticably in some circumstances, but is generally more correct. The
new code also 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.
- New mount type "usertemp" which allows to mount a POSIX directory to
the Windows per-user temporary directory.
- cygpath has a new -U option, which creates cygdrive paths using the
unambiguous /proc/cygdrive prefix.
- New API: rpmatch.
What changed:
-------------
- Align setfacl(1) usage a bit closer to the usage on Linux. Rename -d option
to -x, --substitute to --set. Add --no-mask and --mask options. Allow to
use the -b and -k option combined to allow reducing an ACL to only reflect
standard POSIX permissions.
- Fix (numeric and monetary) decimal point and thousands separator in
fa_IR and ps_AF locales to be aligned with Linux.
- utmpname/utmpxname are now defined as int functions as on Linux.
Addresses: https://cygwin.com/ml/cygwin/2015-12/msg00320.html
Bug Fixes
---------
- Not a bug fix as such, but a workaround for new behaviour in Windows 10
version 1511 64 bit. This version introduces a problem which existed in
a similar variation (just vice versa) in XP and Server 2003 64 bit as well.
An unexpected stack arrangement when starting a 64 bit Cygwin application
from a 32 bit application (e.g. 32 bit CMD.EXE) broke Cygwin's fork.
Addresses: https://cygwin.com/ml/cygwin/2015-12/msg00003.html
- Replaced old, buggy strtold implementation with well-tested gdtoa version
from David M. Gay.
Addresses: https://cygwin.com/ml/cygwin/2015-11/msg00205.html
- Fix handling of relative paths in native symlinks if the target is in a
drive's root dir or one level below.
Addresses: https://cygwin.com/ml/cygwin/2015-11/msg00277.html
- Fix a SEGV when calling `kill -l 0'.
Addresses: https://cygwin.com/ml/cygwin/2015-11/msg00430.html
- Fix a race condition in signal handling.
Addresses: https://cygwin.com/ml/cygwin/2015-11/msg00387.html
- Fix a potential crash reading invalid passwd and group entries from
/etc/passwd and /etc/group.
Addresses: https://cygwin.com/ml/cygwin/2015-12/msg00170.html
- Cygpath(1) now tries to correct the case of system directories when
returned as POSIX paths.
Addresses: https://cygwin.com/ml/cygwin/2016-01/msg00002.html
- *Always* zero out descriptor arrays when returning from select due to
timeout, per POSIX.
Addresses: https://cygwin.com/ml/cygwin/2015-12/msg00332.html
- Return unique inode numbers when calling stat/fstat on pipes and IP sockets.
Addresses: https://cygwin.com/ml/cygwin/2015-12/msg00310.html