cygwin_set_impersonation_token
#include <sys/cygwin.h>
void
cygwin_set_impersonation_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 Switching the user context in the Cygwin User's guide.
See also cygwin_logon_user