s3-talloc Change TALLOC_REALLOC_ARRAY() to talloc_realloc()
[ira/wip.git] / source3 / libgpo / gpo_reg.c
index 39d072f689dcbb5199a62f68346b322b43bc29b0..29b31aec8edec2422755d5cfc26c46aaf297ef55 100644 (file)
 #include "../libgpo/gpo.h"
 #include "libgpo/gpo_proto.h"
 #include "registry.h"
+#include "registry/reg_api.h"
 #include "registry/reg_backend_db.h"
+#include "registry/reg_api_util.h"
+#include "registry/reg_init_basic.h"
+#include "../libcli/security/security.h"
+#include "../libcli/registry/util_reg.h"
 
 
 /****************************************************************
@@ -37,7 +42,7 @@ struct security_token *registry_create_system_token(TALLOC_CTX *mem_ctx)
                return NULL;
        }
 
-       token->privilege_mask = se_priv_all;
+       token->privilege_mask = SE_ALL_PRIVS;
 
        if (!NT_STATUS_IS_OK(add_sid_to_array(token, &global_sid_System,
                         &token->sids, &token->num_sids))) {
@@ -323,7 +328,7 @@ static WERROR gp_reg_del_groupmembership(TALLOC_CTX *mem_ctx,
                                           flags);
        W_ERROR_HAVE_NO_MEMORY(path);
 
-       return reg_deletekey_recursive(mem_ctx, key, path);
+       return reg_deletekey_recursive(key, path);
 
 }
 
@@ -444,7 +449,7 @@ static WERROR gp_del_reg_state(TALLOC_CTX *mem_ctx,
                               struct registry_key *key,
                               const char *path)
 {
-       return reg_deletesubkeys_recursive(mem_ctx, key, path);
+       return reg_deletesubkeys_recursive(key, path);
 }
 
 /****************************************************************
@@ -896,7 +901,7 @@ bool add_gp_registry_entry_to_array(TALLOC_CTX *mem_ctx,
                                    struct gp_registry_entry **entries,
                                    size_t *num)
 {
-       *entries = TALLOC_REALLOC_ARRAY(mem_ctx, *entries,
+       *entries = talloc_realloc(mem_ctx, *entries,
                                        struct gp_registry_entry,
                                        (*num)+1);