Fix broken SID in passwd/group entry for unkown account

* uinfo.cc (pwdgrp::fetch_account_from_windows): Always revert SID
        subauth count after checking for known domain.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
Corinna Vinschen 2015-04-17 11:57:57 +02:00
parent ecc6cfeb7e
commit 02bbbb7506
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2015-04-17 Corinna Vinschen <corinna@vinschen.de>
* uinfo.cc (pwdgrp::fetch_account_from_windows): Always revert SID
subauth count after checking for known domain.
2015-04-17 Corinna Vinschen <corinna@vinschen.de>
* pwdgrp.h: Add comment to explain below change.

View File

@ -2475,10 +2475,10 @@ pwdgrp::fetch_account_from_windows (fetch_user_arg_t &arg, cyg_ldap *pldap)
posix_offset = fetch_posix_offset (td, &loc_ldap);
break;
}
sid_sub_auth_count (sid) = sid_sub_auth_count (sid) + 1;
}
if (domain)
{
sid_sub_auth_count (sid) = sid_sub_auth_count (sid) + 1;
wcscpy (dom, domain);
__small_swprintf (name = namebuf, L"%W(%u)",
is_group () ? L"Group" : L"User",