summaryrefslogtreecommitdiff
path: root/source4/dsdb
diff options
context:
space:
mode:
Diffstat (limited to 'source4/dsdb')
-rw-r--r--source4/dsdb/schema/schema.h6
-rw-r--r--source4/dsdb/schema/schema_syntax.c13
2 files changed, 19 insertions, 0 deletions
diff --git a/source4/dsdb/schema/schema.h b/source4/dsdb/schema/schema.h
index 34423be809..2168202d1f 100644
--- a/source4/dsdb/schema/schema.h
+++ b/source4/dsdb/schema/schema.h
@@ -28,6 +28,12 @@ struct dsdb_attribute;
struct dsdb_class;
struct dsdb_schema;
+struct dsdb_syntax_ctx {
+ struct ldb_context *ldb;
+ const struct dsdb_schema *schema;
+};
+
+
struct dsdb_syntax {
const char *name;
const char *ldap_oid;
diff --git a/source4/dsdb/schema/schema_syntax.c b/source4/dsdb/schema/schema_syntax.c
index 193d62dfcc..a6593b4f78 100644
--- a/source4/dsdb/schema/schema_syntax.c
+++ b/source4/dsdb/schema/schema_syntax.c
@@ -31,6 +31,19 @@
#include "../lib/util/charset/charset.h"
#include "librpc/ndr/libndr.h"
+/**
+ * Initialize dsdb_syntax_ctx with default values
+ * for common cases.
+ */
+void dsdb_syntax_ctx_init(struct dsdb_syntax_ctx *ctx,
+ struct ldb_context *ldb,
+ const struct dsdb_schema *schema)
+{
+ ctx->ldb = ldb;
+ ctx->schema = schema;
+}
+
+
static WERROR dsdb_syntax_FOOBAR_drsuapi_to_ldb(struct ldb_context *ldb,
const struct dsdb_schema *schema,
const struct dsdb_attribute *attr,