Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2014-03-12 19:46:07 +0400
committerCorinna Vinschen <corinna@vinschen.de>2014-03-12 19:46:07 +0400
commite4f48af0fd02a9e87f6ebcff10ab9d5f1d3556dc (patch)
tree077ac1ac6827c497dc3983007ad3e2fa6e166003 /winsup/cygwin/uinfo.cc
parent8861a80ee8b07515478e81a398c74db7ad7e3af4 (diff)
* uinfo.cc (pwdgrp::fetch_account_from_windows): Avoid crash on
non-domain member machines if an unknown SID comes in.
Diffstat (limited to 'winsup/cygwin/uinfo.cc')
-rw-r--r--winsup/cygwin/uinfo.cc3
1 files changed, 2 insertions, 1 deletions
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