diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 4644d35cb..f537983a8 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +2015-11-29 Corinna Vinschen + + * uinfo.cc (pwdgrp::fetch_account_from_windows): Only create 1-5-32-x + SIDs from ids for x <= 999. + 2015-11-29 Corinna Vinschen * sec_acl.cc (get_posix_access): In case owner SID == group SID, when diff --git a/winsup/cygwin/uinfo.cc b/winsup/cygwin/uinfo.cc index df7d42f8e..c9b3e099a 100644 --- a/winsup/cygwin/uinfo.cc +++ b/winsup/cygwin/uinfo.cc @@ -1953,10 +1953,10 @@ pwdgrp::fetch_account_from_windows (fetch_user_arg_t &arg, cyg_ldap *pldap) by mkpasswd/mkgroup. */ if (arg.id < 0x200) __small_swprintf (sidstr, L"S-1-5-%u", arg.id & 0x1ff); + else if (arg.id <= 0x3e7) + __small_swprintf (sidstr, L"S-1-5-32-%u", arg.id & 0x3ff); else if (arg.id == 0x3e8) /* Special case "Other Organization" */ wcpcpy (sidstr, L"S-1-5-1000"); - else if (arg.id <= 0x7ff) - __small_swprintf (sidstr, L"S-1-5-32-%u", arg.id & 0x7ff); else #endif if (arg.id == 0xffe)