diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 1369977c1..65c7328e7 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +2014-03-12 Corinna Vinschen + + * 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 * include/cygwin/socket.h (IPV6_JOIN_GROUP): Revert. diff --git a/winsup/cygwin/uinfo.cc b/winsup/cygwin/uinfo.cc index d1304ebff..10d335644 100644 --- a/winsup/cygwin/uinfo.cc +++ b/winsup/cygwin/uinfo.cc @@ -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