s3:dbwrap: move db_open() to a file dbwrap_open.c of its own.
[ira/wip.git] / source3 / passdb / secrets.c
index 49a01254e3eece4758c5e2c22cd350475be0b127..7ad79c14ece55f2a6c1c8f1bf0e3196d6875e272 100644 (file)
    such as the local SID and machine trust password */
 
 #include "includes.h"
+#include "system/filesys.h"
+#include "passdb.h"
 #include "../libcli/auth/libcli_auth.h"
 #include "librpc/gen_ndr/ndr_secrets.h"
 #include "secrets.h"
 #include "dbwrap.h"
+#include "dbwrap/dbwrap_open.h"
 #include "../libcli/security/security.h"
+#include "util_tdb.h"
 
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_PASSDB
@@ -417,7 +421,7 @@ static int list_trusted_domain(struct db_record *rec, void *private_data)
                return 0;
        }
 
-       if (!(dom_info = TALLOC_P(state->domains, struct trustdom_info))) {
+       if (!(dom_info = talloc(state->domains, struct trustdom_info))) {
                DEBUG(0, ("talloc failed\n"));
                return 0;
        }
@@ -456,7 +460,7 @@ NTSTATUS secrets_trusted_domains(TALLOC_CTX *mem_ctx, uint32 *num_domains,
         * exists
         */
 
-       if (!(state.domains = TALLOC_ARRAY(
+       if (!(state.domains = talloc_array(
                      mem_ctx, struct trustdom_info *, 1))) {
                return NT_STATUS_NO_MEMORY;
        }