The branch, master has been updated via 4752a6b s4-test: yet another test for ATTID-ot-OID conversion via f06d987 s4-dsdb-schema_prefixmap: return WERR_DS_NO_ATTRIBUTE_OR_VALUE when ATTID is not found via 395b09c s4-dsdb-schema_prefixmap: Print debug message when internal failure occurs via 0740d0a s4-devel-getncchanges: Add common Samba options as a group to be displayed from d0a6c32 s3-nmbd: move SYNC_DNS to nmbd.h
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log ----------------------------------------------------------------- commit 4752a6b6d7767a62f322ee3d8e3a412e7699fcea Author: Kamen Mazdrashki <kame...@samba.org> Date: Mon Sep 20 21:28:06 2010 +0300 s4-test: yet another test for ATTID-ot-OID conversion Test with a valid ATTID for prefixMap lookups, but supplied ATTID is with index not to be found in the test prefixMap commit f06d98764a455981c664512acc423715dec3d7a4 Author: Kamen Mazdrashki <kame...@samba.org> Date: Mon Sep 20 20:52:48 2010 +0300 s4-dsdb-schema_prefixmap: return WERR_DS_NO_ATTRIBUTE_OR_VALUE when ATTID is not found rather than WERR_INTERNAL_ERROR - it is not internal error! commit 395b09c1b6ac9df42202966d90b1a121712df418 Author: Kamen Mazdrashki <kame...@samba.org> Date: Mon Sep 20 21:31:20 2010 +0300 s4-dsdb-schema_prefixmap: Print debug message when internal failure occurs commit 0740d0ae85870a6b392cb3ab6cbc3fb36ed3714c Author: Kamen Mazdrashki <kame...@samba.org> Date: Mon Sep 20 21:31:11 2010 +0300 s4-devel-getncchanges: Add common Samba options as a group to be displayed Those options are processed but never shown with --help argument ----------------------------------------------------------------------- Summary of changes: source4/dsdb/schema/schema_prefixmap.c | 7 ++++++- source4/scripting/devel/getncchanges | 1 + source4/torture/drs/unit/prefixmap_tests.c | 9 +++++++-- 3 files changed, 14 insertions(+), 3 deletions(-) Changeset truncated at 500 lines: diff --git a/source4/dsdb/schema/schema_prefixmap.c b/source4/dsdb/schema/schema_prefixmap.c index 8105f12..79894fe 100644 --- a/source4/dsdb/schema/schema_prefixmap.c +++ b/source4/dsdb/schema/schema_prefixmap.c @@ -188,6 +188,7 @@ static WERROR _dsdb_pfm_make_binary_oid(const char *full_oid, TALLOC_CTX *mem_ct /* encode oid in BER format */ if (!ber_write_OID_String(mem_ctx, _bin_oid, full_oid)) { + DEBUG(0,("ber_write_OID_String() failed for %s\n", full_oid)); return WERR_INTERNAL_ERROR; } @@ -341,7 +342,9 @@ WERROR dsdb_schema_pfm_oid_from_attid(struct dsdb_schema_prefixmap *pfm, uint32_ } if (!pfm_entry) { - return WERR_INTERNAL_ERROR; + DEBUG(1,("Failed to find prefixMap entry for ATTID = 0x%08X (%d)\n", + attid, attid)); + return WERR_DS_NO_ATTRIBUTE_OR_VALUE; } /* copy oid prefix making enough room */ @@ -363,6 +366,8 @@ WERROR dsdb_schema_pfm_oid_from_attid(struct dsdb_schema_prefixmap *pfm, uint32_ } 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; } diff --git a/source4/scripting/devel/getncchanges b/source4/scripting/devel/getncchanges index 7656c22..99f14ea 100755 --- a/source4/scripting/devel/getncchanges +++ b/source4/scripting/devel/getncchanges @@ -54,6 +54,7 @@ def do_DsBind(drs): if __name__ == "__main__": parser = OptionParser("getncchanges [options] server") sambaopts = options.SambaOptions(parser) + parser.add_option_group(sambaopts) credopts = options.CredentialsOptionsDouble(parser) parser.add_option_group(credopts) diff --git a/source4/torture/drs/unit/prefixmap_tests.c b/source4/torture/drs/unit/prefixmap_tests.c index a4521eb..a954399 100644 --- a/source4/torture/drs/unit/prefixmap_tests.c +++ b/source4/torture/drs/unit/prefixmap_tests.c @@ -394,8 +394,13 @@ static bool torture_drs_unit_pfm_oid_from_attid_check_attid(struct torture_conte const char *oid; /* Test with valid prefixMap attid */ - werr = dsdb_schema_pfm_oid_from_attid(priv->pfm_full, 0x00000000, tctx, &oid); - torture_assert_werr_ok(tctx, werr, "Testing prefixMap type attid = 0x0000000"); + werr = dsdb_schema_pfm_oid_from_attid(priv->pfm_full, 0x00010001, tctx, &oid); + torture_assert_werr_ok(tctx, werr, "Testing prefixMap type attid = 0x00010001"); + + /* Test with valid attid but invalid index */ + werr = dsdb_schema_pfm_oid_from_attid(priv->pfm_full, 0x01110001, tctx, &oid); + torture_assert_werr_equal(tctx, werr, WERR_DS_NO_ATTRIBUTE_OR_VALUE, + "Testing invalid-index attid = 0x01110001"); /* Test with attid in msDS-IntId range */ werr = dsdb_schema_pfm_oid_from_attid(priv->pfm_full, 0x80000000, tctx, &oid); -- Samba Shared Repository