diff options
author | Andrew Tridgell <tridge@samba.org> | 2011-06-17 11:30:41 +1000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2011-06-17 12:32:55 +1000 |
commit | 49057255999fce2e4aa93de60dc80d40a655e61a (patch) | |
tree | 561d243ac8bf30d85b59086dd92666dedeca333c /source4/dsdb/schema | |
parent | 665ef94d3c15ba59811143bb3d3e395ffd306a58 (diff) | |
download | samba-49057255999fce2e4aa93de60dc80d40a655e61a.tar.gz samba-49057255999fce2e4aa93de60dc80d40a655e61a.tar.bz2 samba-49057255999fce2e4aa93de60dc80d40a655e61a.zip |
s4-dsdb: if we don't have a remote schema, then use the local one
this allows the use of drsuapi_to_ldb() on all attributes for the
local database
Diffstat (limited to 'source4/dsdb/schema')
-rw-r--r-- | source4/dsdb/schema/schema_syntax.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/source4/dsdb/schema/schema_syntax.c b/source4/dsdb/schema/schema_syntax.c index ea582db68b..75dc16252b 100644 --- a/source4/dsdb/schema/schema_syntax.c +++ b/source4/dsdb/schema/schema_syntax.c @@ -1069,8 +1069,14 @@ static WERROR _dsdb_syntax_OID_oid_drsuapi_to_ldb(const struct dsdb_syntax_ctx * struct ldb_message_element *out) { unsigned int i; + const struct dsdb_schema_prefixmap *prefixmap; - SMB_ASSERT(ctx->pfm_remote); + if (ctx->pfm_remote != NULL) { + prefixmap = ctx->pfm_remote; + } else { + prefixmap = ctx->schema->prefixmap; + } + SMB_ASSERT(prefixmap); out->flags = 0; out->name = talloc_strdup(mem_ctx, attr->lDAPDisplayName); @@ -1095,7 +1101,7 @@ static WERROR _dsdb_syntax_OID_oid_drsuapi_to_ldb(const struct dsdb_syntax_ctx * attid = IVAL(in->value_ctr.values[i].blob->data, 0); - status = dsdb_schema_pfm_oid_from_attid(ctx->pfm_remote, attid, + status = dsdb_schema_pfm_oid_from_attid(prefixmap, attid, out->values, &oid); if (!W_ERROR_IS_OK(status)) { DEBUG(0,(__location__ ": Error: Unknown ATTID 0x%08X\n", |