Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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: 6cc7c92 ("(pwdgrp::fetch_account_from_windows): Default primary group for the current user to primary group from user token.") Signed-off-by: Corinna Vinschen <[email protected]>
- Loading branch information