summaryrefslogtreecommitdiff
path: root/source4/dsdb/schema/schema_init.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2008-03-07 07:38:44 +1100
committerAndrew Bartlett <abartlet@samba.org>2008-03-07 07:38:44 +1100
commit449c0c52428e79ffcaa520c590df468b10397fb3 (patch)
treeeaf0e4ad65284ffe72194d11e1a970da251eea2d /source4/dsdb/schema/schema_init.c
parent8b24d248b7c928fd3b20f95ede34302ca274c4ae (diff)
parent7eaa6b5f9a316d658c3ecf98b44a4cdf8a2de512 (diff)
downloadsamba-449c0c52428e79ffcaa520c590df468b10397fb3.tar.gz
samba-449c0c52428e79ffcaa520c590df468b10397fb3.tar.bz2
samba-449c0c52428e79ffcaa520c590df468b10397fb3.zip
Merge branch 'v4-0-test' of git://git.samba.org/samba into 4-0-local
(This used to be commit a6997c333cdd68dfba8a069df448836ff487787f)
Diffstat (limited to 'source4/dsdb/schema/schema_init.c')
-rw-r--r--source4/dsdb/schema/schema_init.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/source4/dsdb/schema/schema_init.c b/source4/dsdb/schema/schema_init.c
index 30d0adeda7..c046cb597f 100644
--- a/source4/dsdb/schema/schema_init.c
+++ b/source4/dsdb/schema/schema_init.c
@@ -29,6 +29,18 @@
#include "librpc/gen_ndr/ndr_drsblobs.h"
#include "param/param.h"
+struct dsdb_schema *dsdb_new_schema(TALLOC_CTX *mem_ctx, struct smb_iconv_convenience *iconv_convenience)
+{
+ struct dsdb_schema *schema = talloc_zero(mem_ctx, struct dsdb_schema);
+ if (!schema) {
+ return NULL;
+ }
+
+ schema->iconv_convenience = iconv_convenience;
+ return schema;
+}
+
+
WERROR dsdb_load_oid_mappings_drsuapi(struct dsdb_schema *schema, const struct drsuapi_DsReplicaOIDMapping_Ctr *ctr)
{
uint32_t i,j;
@@ -1150,12 +1162,7 @@ WERROR dsdb_attach_schema_from_ldif_file(struct ldb_context *ldb, const char *pf
goto nomem;
}
- schema = talloc_zero(mem_ctx, struct dsdb_schema);
- if (!schema) {
- goto nomem;
- }
-
- schema->iconv_convenience = lp_iconv_convenience(ldb_get_opaque(ldb, "loadparm"));
+ schema = dsdb_new_schema(mem_ctx, lp_iconv_convenience(ldb_get_opaque(ldb, "loadparm")));
/*
* load the prefixMap attribute from pf