On Mon, 2009-11-30 at 07:44 -0500, Simo Sorce wrote: > On Mon, 2009-11-30 at 11:47 +0100, Sumit Bose wrote: > > On Fri, Nov 27, 2009 at 07:13:55PM -0500, Simo Sorce wrote: > > > When I did the enumgrent optimization patch I totally forgot about > > > nested groups for some reason. > > > Of course I broke them. The gain in performance although was just way > > > too substantial to just revert to the previous way of resolving nested > > > groups again and again at every search. > > > > > > These 2 patches instead store unrolled groups by adding a new > > > operational attribute: memberuid > > > This attribute contains just the user name of any user directly or > > > indirectly (through a nested group) members of a group. > > > This way computation is done once at modify time and never again. > > > > > > Fixes bug #291 > > > > > > Simo. > > > > > > > 0001 does not compile: > > > > ldb_modules/memberof.c: In function 'memberof_del': > > ldb_modules/memberof.c:1152: error: 'el' undeclared (first use in this > > function) > > ldb_modules/memberof.c:1152: error: (Each undeclared identifier is > > reported only once > > ldb_modules/memberof.c:1152: error: for each function it appears in.) > > I will check, builds and tests fine here. > > > Do I miss another patch which fixes this?
Ok, I think I forgot to send the attached patch first. And 0001 probably didn't apply cleanly to your tree to get that error. Simo. -- Simo Sorce * Red Hat, Inc * New York
>From 6e7c178eb839016cb25ed6e298f38a5aec3d0304 Mon Sep 17 00:00:00 2001 From: Simo Sorce <[email protected]> Date: Wed, 25 Nov 2009 08:59:44 -0500 Subject: [PATCH] Fix tabs --- server/ldb_modules/memberof.c | 42 ++++++++++++++++++++-------------------- 1 files changed, 21 insertions(+), 21 deletions(-) diff --git a/server/ldb_modules/memberof.c b/server/ldb_modules/memberof.c index b151916..bd32d0a 100644 --- a/server/ldb_modules/memberof.c +++ b/server/ldb_modules/memberof.c @@ -220,10 +220,10 @@ static int memberof_add(struct ldb_module *module, struct ldb_request *req) struct ldb_dn *valdn; int i, ret; - if (ldb_dn_is_special(req->op.add.message->dn)) { - /* do not manipulate our control entries */ - return ldb_next_request(module, req); - } + if (ldb_dn_is_special(req->op.add.message->dn)) { + /* do not manipulate our control entries */ + return ldb_next_request(module, req); + } ctx = mbof_init(module, req); if (!ctx) { @@ -501,7 +501,7 @@ static int mbof_add_operation(struct mbof_add_operation *addop) struct mbof_ctx *ctx; struct mbof_add_ctx *add_ctx; struct ldb_context *ldb; - struct ldb_message_element *el; + struct ldb_message_element *el; struct ldb_request *mod_req; struct ldb_message *msg; struct ldb_dn *elval_dn; @@ -672,7 +672,7 @@ static int mbof_add_cleanup(struct mbof_add_ctx *add_ctx) struct ldb_context *ldb; struct ldb_message *msg; struct ldb_request *mod_req; - struct ldb_message_element *el; + struct ldb_message_element *el; struct mbof_ctx *ctx; struct mbof_dn *iter; const char *val; @@ -998,7 +998,7 @@ static int mbof_orig_del_callback(struct ldb_request *req, struct ldb_context *ldb; struct mbof_del_ctx *del_ctx; struct mbof_ctx *ctx; - int ret; + int ret; del_ctx = talloc_get_type(req->context, struct mbof_del_ctx); ctx = del_ctx->ctx; @@ -1015,12 +1015,12 @@ static int mbof_orig_del_callback(struct ldb_request *req, ares->error); } - if (ares->type != LDB_REPLY_DONE) { - talloc_zfree(ares); - ldb_set_errstring(ldb, "Invalid reply type!"); + if (ares->type != LDB_REPLY_DONE) { + talloc_zfree(ares); + ldb_set_errstring(ldb, "Invalid reply type!"); return ldb_module_done(ctx->req, NULL, NULL, LDB_ERR_OPERATIONS_ERROR); - } + } /* save real call stuff */ ctx->ret_ctrls = talloc_steal(ctx, ares->controls); @@ -1106,7 +1106,7 @@ static int mbof_del_clean_par_callback(struct ldb_request *req, struct ldb_context *ldb; struct mbof_del_ctx *del_ctx; struct mbof_ctx *ctx; - int ret; + int ret; del_ctx = talloc_get_type(req->context, struct mbof_del_ctx); first = del_ctx->first; @@ -1125,12 +1125,12 @@ static int mbof_del_clean_par_callback(struct ldb_request *req, ares->error); } - if (ares->type != LDB_REPLY_DONE) { - talloc_zfree(ares); - ldb_set_errstring(ldb, "Invalid reply type!"); + if (ares->type != LDB_REPLY_DONE) { + talloc_zfree(ares); + ldb_set_errstring(ldb, "Invalid reply type!"); return ldb_module_done(ctx->req, NULL, NULL, LDB_ERR_OPERATIONS_ERROR); - } + } if (first->num_parents > first->cur_parent) { /* still parents to cleanup, go on */ @@ -1973,7 +1973,7 @@ static int mbof_orig_mod_callback(struct ldb_request *req, struct ldb_context *ldb; struct mbof_mod_ctx *mod_ctx; struct mbof_ctx *ctx; - int ret; + int ret; mod_ctx = talloc_get_type(req->context, struct mbof_mod_ctx); ctx = mod_ctx->ctx; @@ -1990,13 +1990,13 @@ static int mbof_orig_mod_callback(struct ldb_request *req, ares->error); } - if (ares->type != LDB_REPLY_DONE) { - talloc_zfree(ares); + if (ares->type != LDB_REPLY_DONE) { + talloc_zfree(ares); ldb_debug(ldb, LDB_DEBUG_TRACE, "Invalid reply type!"); - ldb_set_errstring(ldb, "Invalid reply type!"); + ldb_set_errstring(ldb, "Invalid reply type!"); return ldb_module_done(ctx->req, NULL, NULL, LDB_ERR_OPERATIONS_ERROR); - } + } /* save real call stuff */ ctx->ret_ctrls = talloc_steal(ctx, ares->controls); -- 1.6.2.5
_______________________________________________ sssd-devel mailing list [email protected] https://fedorahosted.org/mailman/listinfo/sssd-devel
