From 51a52431ed52e0312c680e52371882088482071f Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Thu, 10 Dec 2009 14:53:17 -0500 Subject: Fix for #316 We were never filling the group attrs because of an inverse return check. Plus fix a crash bug for using a pointer that is not a memory context. --- server/db/sysdb.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/db/sysdb.c b/server/db/sysdb.c index a87b5c565..10da9750f 100644 --- a/server/db/sysdb.c +++ b/server/db/sysdb.c @@ -271,7 +271,7 @@ int sysdb_attrs_users_from_str_list(struct sysdb_attrs *attrs, int ret; ret = sysdb_attrs_get_el(attrs, attr_name, &el); - if (!ret) { + if (ret) { return ret; } @@ -318,11 +318,11 @@ int sysdb_attrs_users_from_ldb_vals(struct sysdb_attrs *attrs, int ret; ret = sysdb_attrs_get_el(attrs, attr_name, &el); - if (!ret) { + if (ret) { return ret; } - vals = talloc_realloc(el, el->values, struct ldb_val, + vals = talloc_realloc(attrs->a, el->values, struct ldb_val, el->num_values + num_values); if (!vals) { return ENOMEM; -- cgit