4
0
mirror of git://sourceware.org/git/newlib-cygwin.git synced 2025-01-19 12:59:21 +08:00
Corinna Vinschen a5bcfe616c Cygwin: uinfo: don't special case current user
fetch_account_from_windows shortcuts the current user in that
it takes the user's domain SID and just adds the matching RID
from the token's primary group to create a group SID.

How wrong this is can be very simply reproduced:

Assuming you run a native process, like cmd, with primary group
set to the Administrators builtin group.  Run Cygwin's id(1) as
child process.  id(1) will print a non-existent group as primary
group and also add it to the group list.

This can only be avoided by not special casing the current user
and thus not creating a group SID from partial information.

Fixes: 6cc7c925ce86 ("(pwdgrp::fetch_account_from_windows): Default primary group for the
current user to primary group from user token.")
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-12-02 16:49:47 +01:00
..
2022-08-08 18:16:09 +02:00
2022-08-04 20:54:09 +02:00
2022-11-24 12:20:50 +01:00
2022-08-04 22:13:59 +02:00
2022-08-04 22:13:59 +02:00
2022-08-04 20:54:09 +02:00
2022-08-04 22:13:59 +02:00
2022-08-08 18:16:09 +02:00
2021-11-15 19:32:23 -05:00
2022-08-04 15:16:48 +02:00
2022-05-29 17:45:52 -04:00
2022-08-04 22:13:59 +02:00
2022-05-29 17:45:52 -04:00
2022-05-29 17:45:52 -04:00
2022-08-04 22:13:59 +02:00
2022-05-29 17:45:52 -04:00
2022-08-04 22:13:59 +02:00
2022-08-04 22:13:59 +02:00
2022-05-29 17:45:52 -04:00
2022-05-29 17:45:52 -04:00
2022-08-04 22:13:59 +02:00
2022-08-04 22:13:59 +02:00
2022-05-29 17:45:52 -04:00
2022-08-04 22:13:59 +02:00
2022-08-04 22:13:59 +02:00
2022-08-04 22:13:59 +02:00