diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2016-03-23 19:42:04 +0300 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2016-03-23 19:42:04 +0300 |
commit | fc504453fd98a03c81d796cff179ebf6262d107c (patch) | |
tree | 8747ada1c7086bb445e8d849bb643628ecf59ae7 | |
parent | 155a1ec5fb27dcbbc2e6464bc6e5d8b08c0b03e5 (diff) |
Use 64K buffers for TOKEN_GROUPS
A user token can be up to 64K in size. Using 32K buffers for TOKEN_GROUPS
may be insufficient.
* uinfo.cc (get_logon_sid): Use 64K buffers for the TOKEN_GROUPS
array.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
-rw-r--r-- | winsup/cygwin/uinfo.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/winsup/cygwin/uinfo.cc b/winsup/cygwin/uinfo.cc index 9596f8fe6..86b010150 100644 --- a/winsup/cygwin/uinfo.cc +++ b/winsup/cygwin/uinfo.cc @@ -1462,12 +1462,12 @@ get_logon_sid () NTSTATUS status; ULONG size; tmp_pathbuf tp; - PTOKEN_GROUPS groups = (PTOKEN_GROUPS) tp.c_get (); + PTOKEN_GROUPS groups = (PTOKEN_GROUPS) tp.w_get (); status = NtQueryInformationToken (hProcToken, TokenGroups, groups, - NT_MAX_PATH, &size); + 2 * NT_MAX_PATH, &size); if (!NT_SUCCESS (status)) - debug_printf ("NtQueryInformationToken() %y", status); + debug_printf ("NtQueryInformationToken (TokenGroups) %y", status); else { for (DWORD pg = 0; pg < groups->GroupCount; ++pg) |