dsdb-acl: add helper variable 'ldb' in acl_sDRightsEffective
authorStefan Metzmacher <metze@samba.org>
Tue, 8 Jan 2013 14:54:47 +0000 (15:54 +0100)
committerMatthieu Patou <mat@matws.net>
Thu, 17 Jan 2013 08:23:06 +0000 (00:23 -0800)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Matthieu Patou <mat@matws.net>
source4/dsdb/samdb/ldb_modules/acl.c

index 2b3abce6b5aff1b52803b6e80d1f179883c84c3b..24b65078030cb471fee8366d3ff14ef989561d73 100644 (file)
@@ -458,6 +458,7 @@ static int acl_sDRightsEffective(struct ldb_module *module,
                                 struct ldb_message *msg,
                                 struct acl_context *ac)
 {
+       struct ldb_context *ldb = ldb_module_get_ctx(module);
        struct ldb_message_element *rightsEffective;
        int ret;
        struct security_descriptor *sd;
@@ -481,7 +482,7 @@ static int acl_sDRightsEffective(struct ldb_module *module,
        }
        else {
                /* Get the security descriptor from the message */
-               ret = dsdb_get_sd_from_ldb_message(ldb_module_get_ctx(module), msg, sd_msg, &sd);
+               ret = dsdb_get_sd_from_ldb_message(ldb, msg, sd_msg, &sd);
                if (ret != LDB_SUCCESS) {
                        return ret;
                }