This is the mail archive of the
mailing list for the Cygwin project.
Re: setup-1.7 defaults to "Just me"
- From: Brian Dessent <brian at dessent dot net>
- To: cygwin-apps at cygwin dot com
- Date: Tue, 15 Apr 2008 21:55:40 -0700
- Subject: Re: setup-1.7 defaults to "Just me"
- References: <20080415133341.GJ23852@calimero.vinschen.de>
- Reply-to: cygwin-apps at cygwin dot com
Corinna Vinschen wrote:
> I just found that, regardless of my privileges, setup-1.7 defaults
> to install for "just me" instead of "all users" while the standard
> setup defaults to "all users". Why does that happen?
This is very odd. Setup's is_admin() was returning 0 despite the user
belonging to the administrators group, and debugging revealed that the
cause was the following:
// Get the group token information
PTOKEN_GROUPS groups = (PTOKEN_GROUPS) token_info;
DWORD token_info_len = sizeof (token_info);
GetTokenInformation (token, TokenGroups, token_info, token_info_len,
For whatever reason, GetTokenInformation was failing and returning
ERROR_NOACCESS when passed a 1024 byte buffer. I changed the code to
first call it with NULL to get the desired size, and that seems to have
satisfied it. I cannot explain why it would object to a 1024 byte
buffer, maybe you have some idea.
I'll install an updated setup-1.7.exe in a moment.