diff options
author | Stefan Metzmacher <metze@samba.org> | 2009-07-31 10:38:04 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2009-07-31 14:40:29 +0200 |
commit | 7d470fdb1b180d63a4e08e7c9d0a88223031053f (patch) | |
tree | 27f0a23438c6206fb6b02c5af9b3a736b678914f | |
parent | 71b013f4deb79f66a28545dc3be910815b123f7c (diff) | |
download | samba-7d470fdb1b180d63a4e08e7c9d0a88223031053f.tar.gz samba-7d470fdb1b180d63a4e08e7c9d0a88223031053f.tar.bz2 samba-7d470fdb1b180d63a4e08e7c9d0a88223031053f.zip |
s4:auth: make sure we have elements returned at all in authsam_expand_nested_groups()
metze
-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]); |