diff options
Diffstat (limited to 'source4')
-rw-r--r-- | source4/dsdb/schema/schema_prefixmap.c | 5 | ||||
-rw-r--r-- | source4/dsdb/schema/schema_syntax.c | 2 | ||||
-rw-r--r-- | source4/torture/drs/drs_util.c | 5 |
3 files changed, 9 insertions, 3 deletions
diff --git a/source4/dsdb/schema/schema_prefixmap.c b/source4/dsdb/schema/schema_prefixmap.c index f900f40a90..aa30fc285b 100644 --- a/source4/dsdb/schema/schema_prefixmap.c +++ b/source4/dsdb/schema/schema_prefixmap.c @@ -375,6 +375,7 @@ WERROR dsdb_schema_pfm_oid_from_attid(const struct dsdb_schema_prefixmap *pfm, uint32_t i; uint32_t hi_word, lo_word; DATA_BLOB bin_oid = {NULL, 0}; + char *oid; struct dsdb_schema_prefixmap_oid *pfm_entry; WERROR werr = WERR_OK; @@ -420,7 +421,7 @@ WERROR dsdb_schema_pfm_oid_from_attid(const struct dsdb_schema_prefixmap *pfm, bin_oid.data[bin_oid.length-1] = lo_word & 0x7f; } - if (!ber_read_OID_String(mem_ctx, bin_oid, _oid)) { + if (!ber_read_OID_String(mem_ctx, bin_oid, &oid)) { DEBUG(0,("ber_read_OID_String() failed for %s\n", hex_encode_talloc(bin_oid.data, bin_oid.data, bin_oid.length))); werr = WERR_INTERNAL_ERROR; @@ -429,6 +430,8 @@ WERROR dsdb_schema_pfm_oid_from_attid(const struct dsdb_schema_prefixmap *pfm, /* free locally allocated memory */ talloc_free(bin_oid.data); + *_oid = oid; + return werr; } diff --git a/source4/dsdb/schema/schema_syntax.c b/source4/dsdb/schema/schema_syntax.c index 1bb9a4f785..715f219530 100644 --- a/source4/dsdb/schema/schema_syntax.c +++ b/source4/dsdb/schema/schema_syntax.c @@ -1376,7 +1376,7 @@ static WERROR _dsdb_syntax_OID_validate_numericoid(const struct dsdb_syntax_ctx for (i=0; i < in->num_values; i++) { DATA_BLOB blob; - const char *oid_out; + char *oid_out; const char *oid = (const char*)in->values[i].data; if (!ber_write_OID_String(tmp_ctx, &blob, oid)) { diff --git a/source4/torture/drs/drs_util.c b/source4/torture/drs/drs_util.c index 6de758e0de..d2d3e3a949 100644 --- a/source4/torture/drs/drs_util.c +++ b/source4/torture/drs/drs_util.c @@ -41,6 +41,7 @@ bool drs_util_oid_from_attid(struct torture_context *tctx, int i; uint32_t hi_word, lo_word; DATA_BLOB bin_oid = {NULL, 0}; + char *oid; struct drsuapi_DsReplicaOIDMapping *map_entry = NULL; TALLOC_CTX *mem_ctx = talloc_named(tctx, 0, "util_drsuapi_oid_from_attid"); @@ -87,10 +88,12 @@ bool drs_util_oid_from_attid(struct torture_context *tctx, } torture_assert(tctx, - ber_read_OID_String(tctx, bin_oid, _oid), + ber_read_OID_String(tctx, bin_oid, &oid), "Failed to decode binary OID"); talloc_free(mem_ctx); + *_oid = oid; + return true; } |