On Feb 22 18:38, Roland Mainz via Cygwin wrote: > Hi! > > ---- > > If I switch the current user's group with /usr/bin/newgrp, how can a > (native) Win32 process use > |GetTokenInformation(GetCurrentThreadToken(), ...)| to find out which > group is the new "current group" (e.g. which |TokenInformationClass| > should I use) ?
PSID sidbuf = (PSID) alloca (SECURITY_MAX_SID_SIZE); NTSTATUS status; ULONG size; status = NtQueryInformationToken (hProcToken, TokenPrimaryGroup, sidbuf, SECURITY_MAX_SID_SIZE, &size); Corinna -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple