setup-1.7 defaults to "Just me"

Corinna Vinschen
Wed Apr 16 09:37:00 GMT 2008

On Apr 16 11:28, Corinna Vinschen wrote:
> On Apr 16 02:12, Brian Dessent wrote:
> > Corinna Vinschen wrote:
> > 
> > > Not really, no.  1024 bytes should be big enough in most cases.  Did you
> > > look for the desired size which now gets returned by the NULL call?
> > 
> > Yes, it was in the neighborhood of 230 bytes or so.  It wasn't that the
> > buffer was too small, and I would have expected
> > ERROR_INSUFFICIENT_BUFFER anyway in that case.  It was just something
> > about the buffer that it didn't like.
> Alignment?

I mean, token_info was an UCHAR array, so it's not aligned while
the token_group information might require a 4 or 8 byte alignment
which you now get by chance.  Probably you'd be better off not
using `char buf[size]' but

  PTOKEN_GROUPS groups = (PTOKEN_GROUPS) alloca (size);

instead because alloca always aligns sufficiently.  What sounds strange
here is that MSDN does not state anything about alignment requirements
for the GetTokenInformation call.  However, it also didn't say anything
about alignment requirements of ZwQueryDirectoryFile but it failed
on W2K for that reason nevertheless.


Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

More information about the Cygwin-apps mailing list