mirror of
https://github.com/samba-team/samba.git
synced 2025-01-08 21:18:16 +03:00
passdb: spare superfluous call to lookup_rids() in lookup_sids()
If we have no name indexes for a domain, all names were domain names and have been resolved earlier, including the domain name. Bug: https://bugzilla.samba.org/show_bug.cgi?id=10463 Change-Id: I5a7a387fa89d2b2bdd465c13b3dca0e18ca0482c Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Tue Feb 25 11:17:18 CET 2014 on sn-devel-104
This commit is contained in:
parent
0cb15c169f
commit
e35b1d8dc4
@ -899,13 +899,18 @@ NTSTATUS lookup_sids(TALLOC_CTX *mem_ctx, int num_sids,
|
||||
break;
|
||||
}
|
||||
|
||||
if (dom->num_idxs) {
|
||||
if (!(rids = talloc_array(tmp_ctx, uint32, dom->num_idxs))) {
|
||||
result = NT_STATUS_NO_MEMORY;
|
||||
goto fail;
|
||||
}
|
||||
} else {
|
||||
rids = NULL;
|
||||
if (dom->num_idxs == 0) {
|
||||
/*
|
||||
* This happens only if the only sid related to
|
||||
* this domain is the domain sid itself, which
|
||||
* is mapped to SID_NAME_DOMAIN above.
|
||||
*/
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!(rids = talloc_array(tmp_ctx, uint32, dom->num_idxs))) {
|
||||
result = NT_STATUS_NO_MEMORY;
|
||||
goto fail;
|
||||
}
|
||||
|
||||
for (j=0; j<dom->num_idxs; j++) {
|
||||
|
Loading…
Reference in New Issue
Block a user