diff options
Diffstat (limited to 'source4')
-rw-r--r-- | source4/lib/ldb-samba/ldif_handlers.c | 20 | ||||
-rw-r--r-- | source4/lib/ldb-samba/ldif_handlers.h | 1 |
2 files changed, 21 insertions, 0 deletions
diff --git a/source4/lib/ldb-samba/ldif_handlers.c b/source4/lib/ldb-samba/ldif_handlers.c index ebaa024cb6..11f5914b37 100644 --- a/source4/lib/ldb-samba/ldif_handlers.c +++ b/source4/lib/ldb-samba/ldif_handlers.c @@ -492,6 +492,19 @@ static int ldif_comparison_objectCategory(struct ldb_context *ldb, void *mem_ctx } /* + convert a NDR formatted blob to a ldif formatted schemaInfo +*/ +static int ldif_write_schemaInfo(struct ldb_context *ldb, void *mem_ctx, + const struct ldb_val *in, struct ldb_val *out) +{ + return ldif_write_NDR(ldb, mem_ctx, in, out, + sizeof(struct repsFromToBlob), + (ndr_pull_flags_fn_t)ndr_pull_schemaInfoBlob, + (ndr_print_fn_t)ndr_print_schemaInfoBlob, + true); +} + +/* convert a ldif formatted prefixMap to a NDR formatted blob */ static int ldif_read_prefixMap(struct ldb_context *ldb, void *mem_ctx, @@ -938,6 +951,12 @@ static const struct ldb_schema_syntax samba_syntaxes[] = { .canonicalise_fn = ldif_canonicalise_objectCategory, .comparison_fn = ldif_comparison_objectCategory },{ + .name = LDB_SYNTAX_SAMBA_SCHEMAINFO, + .ldif_read_fn = ldb_handler_copy, + .ldif_write_fn = ldif_write_schemaInfo, + .canonicalise_fn = ldb_handler_copy, + .comparison_fn = ldb_comparison_binary + },{ .name = LDB_SYNTAX_SAMBA_PREFIX_MAP, .ldif_read_fn = ldif_read_prefixMap, .ldif_write_fn = ldif_write_prefixMap, @@ -1063,6 +1082,7 @@ static const struct { { "netbootGUID", LDB_SYNTAX_SAMBA_GUID }, { "msDS-OptionalFeatureGUID", LDB_SYNTAX_SAMBA_GUID }, { "objectCategory", LDB_SYNTAX_SAMBA_OBJECT_CATEGORY }, + { "schemaInfo", LDB_SYNTAX_SAMBA_SCHEMAINFO }, { "prefixMap", LDB_SYNTAX_SAMBA_PREFIX_MAP }, { "repsFrom", LDB_SYNTAX_SAMBA_REPSFROMTO }, { "repsTo", LDB_SYNTAX_SAMBA_REPSFROMTO }, diff --git a/source4/lib/ldb-samba/ldif_handlers.h b/source4/lib/ldb-samba/ldif_handlers.h index 8e4df77ffc..bd5ed3145e 100644 --- a/source4/lib/ldb-samba/ldif_handlers.h +++ b/source4/lib/ldb-samba/ldif_handlers.h @@ -5,6 +5,7 @@ #define LDB_SYNTAX_SAMBA_SECURITY_DESCRIPTOR "1.2.840.113556.1.4.907" #define LDB_SYNTAX_SAMBA_GUID "LDB_SYNTAX_SAMBA_GUID" #define LDB_SYNTAX_SAMBA_OBJECT_CATEGORY "LDB_SYNTAX_SAMBA_OBJECT_CATEGORY" +#define LDB_SYNTAX_SAMBA_SCHEMAINFO "LDB_SYNTAX_SAMBA_SCHEMAINFO" #define LDB_SYNTAX_SAMBA_PREFIX_MAP "LDB_SYNTAX_SAMBA_PREFIX_MAP" #define LDB_SYNTAX_SAMBA_INT32 "LDB_SYNTAX_SAMBA_INT32" #define LDB_SYNTAX_SAMBA_REPSFROMTO "LDB_SYNTAX_SAMBA_REPSFROMTO" |