This is the mail archive of the
mailing list for the Cygwin project.
Re: how to drop administrator privileges?
Corinna Vinschen wrote:
$ net helpmsg 122
The data area passed to a system call is too small.
A quick look into the sources shows that the maximum buffer size for
the group list returned by GetTokenInformation is wrongly computed:
max_groups = 100;
char groups_buf[sizeof(DWORD) + max_groups * sizeof(SID_AND_ATTRIBUTES)];
The SID_AND_ATTRIBUTES structure only contains a pointer to the SID, so
what's missing is actual space for the SIDs.
But it would be better to leave that to the OS anyway:
Thanks for the patch. Works as expected.
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple