Only generate BUILTIN SIDs for uid/gid values <= 999

* uinfo.cc (pwdgrp::fetch_account_from_windows): Only create 1-5-32-x
	SIDs from ids for x <= 999.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
Corinna Vinschen 2015-11-29 21:21:35 +01:00
parent 47e7288769
commit e7414a317a
2 changed files with 7 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2015-11-29 Corinna Vinschen <corinna@vinschen.de>
* uinfo.cc (pwdgrp::fetch_account_from_windows): Only create 1-5-32-x
SIDs from ids for x <= 999.
2015-11-29 Corinna Vinschen <corinna@vinschen.de>
* sec_acl.cc (get_posix_access): In case owner SID == group SID, when

View File

@ -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)