mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
s4/ldif: Handle Schema:schemaInfo blobs
This commit is contained in:
parent
ffd1d7ee7e
commit
6e7be5f4d1
@ -491,6 +491,19 @@ static int ldif_comparison_objectCategory(struct ldb_context *ldb, void *mem_ctx
|
||||
v1, v2);
|
||||
}
|
||||
|
||||
/*
|
||||
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
|
||||
*/
|
||||
@ -937,6 +950,12 @@ static const struct ldb_schema_syntax samba_syntaxes[] = {
|
||||
.ldif_write_fn = ldb_handler_copy,
|
||||
.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,
|
||||
@ -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 },
|
||||
|
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user