Cygwin: fix permissions of winpid symlinks

The winpid symlinks got created with no query permissions, so
only admins could see all Cygwin processes.  Create symlinks
so everyone has query permissions instead.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
Corinna Vinschen 2019-03-11 21:40:04 +01:00
parent 7cbe4b59d6
commit d9f934c9e9
2 changed files with 15 additions and 1 deletions

View File

@ -325,7 +325,8 @@ pinfo::create_winpid_symlink ()
__small_swprintf (pid_name, L"%u", procinfo->pid);
RtlInitUnicodeString (&pid_str, pid_name);
InitializeObjectAttributes (&attr, &sym_str, OBJ_CASE_INSENSITIVE,
get_shared_parent_dir (), NULL);
get_shared_parent_dir (),
everyone_sd (SYMBOLIC_LINK_QUERY));
NtCreateSymbolicLinkObject (&winpid_hdl, SYMBOLIC_LINK_ALL_ACCESS,
&attr, &pid_str);
}

View File

@ -0,0 +1,13 @@
What's new:
-----------
What changed:
-------------
Bug Fixes
---------
- Fix access to process list
Addresses: https://cygwin.com/ml/cygwin/2019-03/msg00253.html