CYGWIN_LOGON_USER(3)

NAME
cygwin_logon_user

SYNOPSIS

#include <sys/cygwin.h>

HANDLE cygwin_logon_user(const struct passwd *passwd_entry, const char *password);

DESCRIPTION

Given a pointer to a passwd entry of a user and a cleartext password, returns a HANDLE to an impersonation token for this user which can be used in a subsequent call to cygwin_set_impersonation_token to impersonate that user. This function can only be called from a process which has the required NT user rights to perform a logon.

SEE ALSO

See also the chapter Switching the user context[1] in the Cygwin User's guide.

See also cygwin_set_impersonation_token

COPYRIGHT

Copyright © Cygwin authors

Permission is granted to make and distribute verbatim copies of this documentation provided the copyright notice and this permission notice are preserved on all copies.

Permission is granted to copy and distribute modified versions of this documentation under the conditions for verbatim copying, provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one.

Permission is granted to copy and distribute translations of this documentation into another language, under the above conditions for modified versions, except that this permission notice may be stated in a translation approved by the Free Software Foundation.

NOTES

1.  Switching the user context
    https://cygwin.com/cygwin-ug-net/../cygwin-ug-net/ntsec.html#ntsec-setuid-overview