* sec_auth.cc (get_server_groups): Call get_user_local_groups only if

get_logon_server succeeded.
This commit is contained in:
Corinna Vinschen 2014-05-22 16:40:13 +00:00
parent ee9b1ceb2d
commit de13ccea73
2 changed files with 11 additions and 3 deletions

View File

@ -1,3 +1,8 @@
2014-05-22 Corinna Vinschen <corinna@vinschen.de>
* sec_auth.cc (get_server_groups): Call get_user_local_groups only if
get_logon_server succeeded.
2014-05-22 Corinna Vinschen <corinna@vinschen.de>
* ldap.cc (cyg_ldap::fetch_ad_account): Take additional domain string

View File

@ -467,12 +467,15 @@ get_server_groups (cygsidlist &grp_list, PSID usersid, struct passwd *pw)
return false;
}
/* If the SID does NOT start with S-1-5-21, the domain is some builtin
domain. The search for a logon server is moot. */
domain. The search for a logon server and fetching group accounts
is moot. */
if (sid_id_auth (usersid) == 5 /* SECURITY_NT_AUTHORITY */
&& sid_sub_auth (usersid, 0) == SECURITY_NT_NON_UNIQUE
&& get_logon_server (domain, server, DS_IS_FLAT_NAME))
get_user_groups (server, grp_list, user, domain);
get_user_local_groups (server, domain, grp_list, user);
{
get_user_groups (server, grp_list, user, domain);
get_user_local_groups (server, domain, grp_list, user);
}
return true;
}