]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s4:operational LDB module - use right memory context int "construct_primary_group_token"
authorMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>
Thu, 4 Mar 2010 13:28:04 +0000 (14:28 +0100)
committerMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>
Thu, 4 Mar 2010 17:16:21 +0000 (18:16 +0100)
Use the "msg" as temporary context and not "ldb" which lives much longer.

source4/dsdb/samdb/ldb_modules/operational.c

index b017f2383f03363ba080f833ba7944dbd4085e73..413ea6b528305336ec030a92ea2dca8eb5d9b428 100644 (file)
@@ -106,12 +106,12 @@ static int construct_primary_group_token(struct ldb_module *module,
        ldb = ldb_module_get_ctx(module);
        if (ldb_match_msg_objectclass(msg, "group") == 1) {
                primary_group_token
-                       = samdb_result_rid_from_sid(ldb, msg, "objectSid", 0);
+                       = samdb_result_rid_from_sid(msg, msg, "objectSid", 0);
                if (primary_group_token == 0) {
                        return LDB_SUCCESS;
                }
 
-               return samdb_msg_add_int(ldb, ldb, msg, "primaryGroupToken",
+               return samdb_msg_add_int(ldb, msg, msg, "primaryGroupToken",
                        primary_group_token);
        } else {
                return LDB_SUCCESS;