Cygwin: seteuid: work with password-less user switch as well
The previous patch failed with password-less auth because in that case the return code from get_server_groups wasn't tested. Fix that. Also make sure that get_server_groups does not check if the account is disabled or locked out when just fetching the group list for initgroups or getgrouplist. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
@@ -482,7 +482,13 @@ HANDLE lsaprivkeyauth (struct passwd *pw);
|
||||
/* Verify an existing token */
|
||||
bool verify_token (HANDLE token, cygsid &usersid, user_groups &groups, bool *pintern = NULL);
|
||||
/* Get groups of a user */
|
||||
bool get_server_groups (cygsidlist &grp_list, PSID usersid);
|
||||
enum acct_disabled_chk_t {
|
||||
NO_CHK_DISABLED = 0,
|
||||
CHK_DISABLED = 1
|
||||
};
|
||||
|
||||
bool get_server_groups (cygsidlist &grp_list, PSID usersid,
|
||||
acct_disabled_chk_t check_account_disabled);
|
||||
|
||||
/* Extract U-domain\user field from passwd entry. */
|
||||
void extract_nt_dom_user (const struct passwd *pw, PWCHAR domain, PWCHAR user);
|
||||
|
Reference in New Issue
Block a user