1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-04 16:58:42 +03:00

r13511: Fix bug in the samr dispinfo enumeration code.

Make sure to associate the DOMAIN dispinfo cache
with a User/Group SAMR handle (not the SID of the user or group).
Ensure that enumeration after deleting a user works.
(This used to be commit 7967f89caa17ea93cb7e9d8695f1904ccb9a2864)
This commit is contained in:
Gerald Carter 2006-02-15 18:24:16 +00:00 committed by Gerald (Jerry) Carter
parent fbe02a6021
commit 87d23f263f

View File

@ -252,6 +252,17 @@ static DISP_INFO *get_samr_dispinfo_by_sid(DOM_SID *psid, const char *sid_str)
TALLOC_CTX *mem_ctx;
DISP_INFO *dpi;
/* There are two cases to consider here:
1) The SID is a domain SID and we look for an equality match, or
2) This is an account SID and so we return the DISP_INFO* for our
domain */
if ( psid && sid_check_is_in_our_domain( psid ) ) {
DEBUG(10,("get_samr_dispinfo_by_sid: Replacing %s with our domain SID\n",
sid_str));
psid = get_global_sam_sid();
}
for (dpi = disp_info_list; dpi; dpi = dpi->next) {
if (sid_equal(psid, &dpi->sid)) {
return dpi;