cygwin_set_impersonation_token

extern "C" void cygwin_set_impersonation_token(token); 
const HANDLE token;
 

Use this function to enable the token given as parameter as impersonation token for the next call to setuid or seteuid. Use cygwin_set_impersonation_token together with cygwin_logon_user to impersonate users using password authentication.

See also the chapter "New setuid concept" in the Cygwin user's guide.

See also cygwin_logon_user