diff options
Diffstat (limited to 'source3/nsswitch/idmap.c')
-rw-r--r-- | source3/nsswitch/idmap.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/source3/nsswitch/idmap.c b/source3/nsswitch/idmap.c index 5222eba8f3..73a30f6087 100644 --- a/source3/nsswitch/idmap.c +++ b/source3/nsswitch/idmap.c @@ -1025,17 +1025,16 @@ static NTSTATUS idmap_backends_sids_to_unixids(struct id_map **ids) DEBUG(10, ("Query backends to map sids->ids\n")); /* split list per domain */ - - if (num_domains) { - dom_ids = TALLOC_ZERO_ARRAY(ctx, struct id_map **, num_domains); - IDMAP_CHECK_ALLOC(dom_ids); - counters = TALLOC_ZERO_ARRAY(ctx, int, num_domains); - IDMAP_CHECK_ALLOC(counters); - } else { - dom_ids = NULL; - counters = NULL; + if (num_domains == 0) { + DEBUG(1, ("No domains available?\n")); + return NT_STATUS_UNSUCCESSFUL; } + dom_ids = TALLOC_ZERO_ARRAY(ctx, struct id_map **, num_domains); + IDMAP_CHECK_ALLOC(dom_ids); + counters = TALLOC_ZERO_ARRAY(ctx, int, num_domains); + IDMAP_CHECK_ALLOC(counters); + /* partition the requests by domain */ for (i = 0; ids[i]; i++) { |