summaryrefslogtreecommitdiff
path: root/source4/dsdb/schema
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-03-07 18:03:54 +0100
committerJelmer Vernooij <jelmer@samba.org>2008-03-07 18:03:54 +0100
commitfc2cd5ed638b7b3b0ab2cef21ba032d7d958a0c2 (patch)
treec343b97a8c16fcacd7703adcf4ee6f84fa7ee2a1 /source4/dsdb/schema
parent5a5b50f3dd7d75214184f711c35a7536b64cbbe7 (diff)
parent97a272a4bf1178c1adcc5761d162b74c338dd230 (diff)
downloadsamba-fc2cd5ed638b7b3b0ab2cef21ba032d7d958a0c2.tar.gz
samba-fc2cd5ed638b7b3b0ab2cef21ba032d7d958a0c2.tar.bz2
samba-fc2cd5ed638b7b3b0ab2cef21ba032d7d958a0c2.zip
Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into v4-0-gmake3
(This used to be commit e4da851bd7e7620bbf99efe20a496b1be78ba4e2)
Diffstat (limited to 'source4/dsdb/schema')
-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