diff options
Diffstat (limited to 'source4')
-rw-r--r-- | source4/auth/sam.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source4/auth/sam.c b/source4/auth/sam.c index b991090338..6285c31e5c 100644 --- a/source4/auth/sam.c +++ b/source4/auth/sam.c @@ -333,6 +333,12 @@ static NTSTATUS authsam_expand_nested_groups(struct ldb_context *sam_ctx, return NT_STATUS_INTERNAL_DB_CORRUPTION; } + if (res[0]->num_elements == 0) { + talloc_free(res); + talloc_free(tmp_ctx); + return NT_STATUS_OK; + } + for (i = 0; i < res[0]->elements[0].num_values; i++) { tmp_dn = ldb_dn_from_ldb_val(tmp_ctx, sam_ctx, &res[0]->elements[0].values[i]); |