From 8375f313b21253f72ad958d954f558a74141cf54 Mon Sep 17 00:00:00 2001 From: Jakub Hrozek Date: Thu, 16 Sep 2010 17:09:16 +0200 Subject: Fix sysdb_attrs_to_list --- src/db/sysdb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/db/sysdb.c') diff --git a/src/db/sysdb.c b/src/db/sysdb.c index 5f002d84..a2a94a5b 100644 --- a/src/db/sysdb.c +++ b/src/db/sysdb.c @@ -1686,13 +1686,13 @@ errno_t sysdb_attrs_to_list(TALLOC_CTX *memctx, for (attr_idx = 0; attr_idx < attr_count; attr_idx++) { /* Examine each attribute within the entry */ for (i = 0; i < attrs[attr_idx]->num; i++) { - if (strcasecmp(attrs[attr_idx]->a->name, attr_name) == 0) { + if (strcasecmp(attrs[attr_idx]->a[i].name, attr_name) == 0) { /* Attribute name matches the requested name * Copy it to the output list */ list[list_idx] = talloc_strdup( list, - (const char *)attrs[attr_idx]->a->values[0].data); + (const char *)attrs[attr_idx]->a[i].values[0].data); if (!list[list_idx]) { talloc_free(list); return ENOMEM; -- cgit