1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

lib/ldb-samba: add ldif handler for msDS-TrustForestTrustInfo

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
This commit is contained in:
Stefan Metzmacher 2014-11-19 12:24:47 +01:00 committed by Michael Adam
parent 911439639a
commit 5c60dc429f
2 changed files with 21 additions and 0 deletions

View File

@ -959,6 +959,18 @@ static int ldif_write_trustAuthInOutBlob(struct ldb_context *ldb, void *mem_ctx,
true);
}
/*
convert a NDR formatted blob to a ldif formatted msDS-TrustForestTrustInfo
*/
static int ldif_write_ForestTrustInfo(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 ForestTrustInfo),
(ndr_pull_flags_fn_t)ndr_pull_ForestTrustInfo,
(ndr_print_fn_t)ndr_print_ForestTrustInfo,
true);
}
/*
convert a NDR formatted blob of a partialAttributeSet into text
*/
@ -1331,6 +1343,13 @@ static const struct ldb_schema_syntax samba_syntaxes[] = {
.canonicalise_fn = ldb_handler_copy,
.comparison_fn = ldb_comparison_binary,
.operator_fn = samba_syntax_operator_fn
},{
.name = LDB_SYNTAX_SAMBA_FORESTTRUSTINFO,
.ldif_read_fn = ldb_handler_copy,
.ldif_write_fn = ldif_write_ForestTrustInfo,
.canonicalise_fn = ldb_handler_copy,
.comparison_fn = ldb_comparison_binary,
.operator_fn = samba_syntax_operator_fn
},{
.name = DSDB_SYNTAX_BINARY_DN,
.ldif_read_fn = ldb_handler_copy,
@ -1460,6 +1479,7 @@ static const struct {
{ "replUpToDateVector", LDB_SYNTAX_SAMBA_REPLUPTODATEVECTOR },
{ "trustAuthIncoming", LDB_SYNTAX_SAMBA_TRUSTAUTHINOUTBLOB },
{ "trustAuthOutgoing", LDB_SYNTAX_SAMBA_TRUSTAUTHINOUTBLOB },
{ "msDS-TrustForestTrustInfo", LDB_SYNTAX_SAMBA_FORESTTRUSTINFO },
{ "rIDAllocationPool", LDB_SYNTAX_SAMBA_RANGE64 },
{ "rIDPreviousAllocationPool", LDB_SYNTAX_SAMBA_RANGE64 },
{ "rIDAvailablePool", LDB_SYNTAX_SAMBA_RANGE64 },

View File

@ -17,6 +17,7 @@
#define LDB_SYNTAX_SAMBA_SUPPLEMENTALCREDENTIALS "LDB_SYNTAX_SAMBA_SUPPLEMENTALCREDENTIALS"
#define LDB_SYNTAX_SAMBA_SDDL_SECURITY_DESCRIPTOR "LDB_SYNTAX_SAMBA_SDDL"
#define LDB_SYNTAX_SAMBA_TRUSTAUTHINOUTBLOB "LDB_SYNTAX_SAMBA_TRUSTAUTHINOUTBLOB"
#define LDB_SYNTAX_SAMBA_FORESTTRUSTINFO "LDB_SYNTAX_SAMBA_FORESTTRUSTINFO"
#define LDB_SYNTAX_SAMBA_PARTIALATTRIBUTESET "LDB_SYNTAX_SAMBA_PARTIALATTRIBUTESET"
#include "lib/ldb-samba/ldif_handlers_proto.h"