* uinfo.cc (pwdgrp::fetch_account_from_windows): Avoid crash on

non-domain member machines if an unknown SID comes in.
This commit is contained in:
Corinna Vinschen 2014-03-12 15:46:07 +00:00
parent 8861a80ee8
commit e4f48af0fd
2 changed files with 7 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2014-03-12 Corinna Vinschen <corinna@vinschen.de>
* uinfo.cc (pwdgrp::fetch_account_from_windows): Avoid crash on
non-domain member machines if an unknown SID comes in.
2014-03-12 Corinna Vinschen <corinna@vinschen.de>
* include/cygwin/socket.h (IPV6_JOIN_GROUP): Revert.

View File

@ -1752,7 +1752,8 @@ pwdgrp::fetch_account_from_windows (fetch_user_arg_t &arg, cyg_ldap *pldap)
}
else
{
if (sid_id_auth (sid) == 5 /* SECURITY_NT_AUTHORITY */
if (cygheap->dom.member_machine ()
&& sid_id_auth (sid) == 5 /* SECURITY_NT_AUTHORITY */
&& sid_sub_auth (sid, 0) == SECURITY_NT_NON_UNIQUE)
{
/* Check if we know the domain. If so, create a passwd/group