mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-01-20 21:39:21 +08:00
57640bee75
Commit 5a0f2c00aa "Cygwin: fork/exec: fix child process permissions" removed the PROCESS_DUP_HANDLE handle permission of the parent process handle in the child to avoid a security problem. It turned out that this broke the following scenario: If a process forks and then the parent execs, the child loses the ability to register the parent's death. To wit, after the parent died the child process does not set its own PPID to 1 anymore. The current exec mechanism copies required handle values (handles to keep contact to the child processes) into the child_info for the about-to-be-exec'ed process. The exec'ed process is supposed to duplicate these handles. This fails, given that we don't allow the exec'ed process PROCESS_DUP_HANDLE access to the exec'ing process since commit 5a0f2c00aa. The fix is to avoid the DuplicateHandle calls in the exec'ed process. This patch sets the affected handles to "inheritable" in the exec'ing process at exec time. The exec'ed process just copies the handle values and resets handle inheritance to "non-inheritable". The exec'ing process doesn't have to reset handle inheritance, it exits after setting up the exec'ed process anyway. Testcase: $ ssh-agent /bin/sleep 3 ssh-agent forks and the parent exec's sleep. After sleep exits, `ps' should show ssh-agent to have PPID 1, and eventually ssh-agent exits. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
100 lines
3.7 KiB
Plaintext
100 lines
3.7 KiB
Plaintext
What's new:
|
|
-----------
|
|
|
|
- Add 24 bit color support using xterm compatibility mode in Windows 10
|
|
1703 or later. Add fake 24 bit color support for legacy console,
|
|
which uses the nearest color from 16 system colors.
|
|
|
|
- Support pseudo console in PTY. Pseudo console is a new feature
|
|
in Windows 10 1809, which provides console APIs on virtual
|
|
terminal. With this patch, native console applications can work
|
|
in PTYs such as mintty, ssh, gnu screen or tmux.
|
|
|
|
- New APIs: sched_getaffinity, sched_setaffinity, pthread_getaffinity_np,
|
|
pthread_setaffinity_np, plus CPU_SET macros.
|
|
|
|
- New APIs: dbm_clearerr, dbm_close, dbm_delete, dbm_dirfno, dbm_error,
|
|
dbm_fetch, dbm_firstkey, dbm_nextkey, dbm_open, dbm_store.
|
|
|
|
|
|
What changed:
|
|
-------------
|
|
|
|
- FIFOs can now be opened multiple times for writing.
|
|
Addresses: https://cygwin.com/ml/cygwin/2015-03/msg00047.html
|
|
https://cygwin.com/ml/cygwin/2015-12/msg00311.html
|
|
|
|
- If a SA_SIGINFO signal handler changes the ucontext_t pointed to by
|
|
the third parameter, follow it after returning from the handler.
|
|
|
|
- Eliminate a header file name collision with <X11/XLocale.h> on case
|
|
insensitive filesystems by reverting <xlocale.h> back to <sys/_locale.h>.
|
|
|
|
- Allow times(2) to have a NULL argument, as on Linux.
|
|
Addresses: https://cygwin.com/ml/cygwin/2019-09/msg00141.html
|
|
|
|
- Improve /proc/cpuinfo output and align more closely with Linux.
|
|
|
|
|
|
Bug Fixes
|
|
---------
|
|
|
|
- Fix select() on console in canonical mode. Return after one line is
|
|
completed, instead of when only one key is typed.
|
|
|
|
- Make console I/O functions thread-safe.
|
|
|
|
- Define missing MSG_EOR. It's unsupported by the underlying Winsock
|
|
layer so using it in send(2), sendto(2), or sendmsg(2) will return -1
|
|
with errno set to EOPNOTSUPP and recvmsg(2) will never return it.
|
|
|
|
- Fix a timerfd deadlock.
|
|
Addresses: https://cygwin.com/ml/cygwin/2019-06/msg00096.html
|
|
|
|
- Fix sigpending() incorrectly returning signals for unrelated threads.
|
|
Addresses: https://cygwin.com/ml/cygwin/2019-07/msg00051.html
|
|
|
|
- Fix a hang when opening a FIFO with O_PATH.
|
|
Addresses: https://cygwin.com/ml/cygwin-developers/2019-06/msg00001.html
|
|
|
|
- Don't append ".lnk" when renaming a socket file.
|
|
Addresses: https://cygwin.com/ml/cygwin/2019-07/msg00139.html
|
|
|
|
- Make tcsetpgrp() return -1 if its argument is negative.
|
|
Addresses: https://cygwin.com/ml/cygwin/2019-07/msg00166.html
|
|
|
|
- Avoid mistakenly moving a process under debugger control into the
|
|
process group of the debugger.
|
|
Addresses a problem visible in GDB 8.1.1, related to
|
|
https://cygwin.com/ml/cygwin/2019-07/msg00166.html
|
|
|
|
- Return ENOEXEC from execve for arbitrary files only if the files are
|
|
executable.
|
|
Addresses: https://cygwin.com/ml/cygwin/2019-08/msg00054.html
|
|
|
|
- Fix off-by-one in environment evaluation leading to an abort.
|
|
Addresses: https://cygwin.com/ml/cygwin-patches/2019-q3/msg00069.html
|
|
|
|
- Make output of /proc/[PID]/stat consistent with getpriority().
|
|
Addresses: https://cygwin.com/ml/cygwin/2019-08/msg00082.html
|
|
|
|
- 64 bit only: Avoid collisions between memory maps created with shmat
|
|
and Windows datastructures during fork.
|
|
Addresses: https://cygwin.com/ml/cygwin/2019-08/msg00107.html
|
|
|
|
- Make rmdir fail if its argument is a symlink.
|
|
Addresses: https://cygwin.com/ml/cygwin/2019-09/msg00221.html
|
|
|
|
- Fix an assertion failure on an invalid path.
|
|
Addresses: https://cygwin.com/ml/cygwin/2019-09/msg00228.html
|
|
|
|
- If the argument to mkdir(2) or rmdir(2) is 'x:\', don't strip the
|
|
trailing backslash.
|
|
Addresses: https://cygwin.com/ml/cygwin/2019-08/msg00334.html
|
|
|
|
- Make spawnvp, spawnvpe fail if the executable is not in $PATH.
|
|
Addresses: https://cygwin.com/ml/cygwin/2019-10/msg00032.html
|
|
|
|
- Fix parent/child relationship after parent dies.
|
|
Addresses: https://cygwin.com/ml/cygwin/2019-09/msg00263.html
|