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

40 Commits

Author SHA1 Message Date
Joseph Sutton
005866b109 s4-smbtorture: Fix typo in assertion message
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2022-03-17 00:41:34 +00:00
Volker Lendecke
07c6484433 torture: Align a few integer types
Also move a variable closer to its use

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2020-08-17 19:35:37 +00:00
Günther Deschner
2076c943bc werror: replace WERR_NOMEM with WERR_NOT_ENOUGH_MEMORY in source4/torture/drs/unit/prefixmap_tests.c
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-09-28 00:04:20 +02:00
Stefan Metzmacher
2e6860df71 s4:dsdb/schema: don't update the in memory schema->prefixmap without reloading the schema!
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12128

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-08-11 00:49:14 +02:00
Stefan Metzmacher
0a1627de6d s4:dsdb/schema: don't treat an older remote schema as SCHEMA_MISMATCH
It's perfectly valid to replicate from a partner with an older schema
version, otherwise schema changes would block any other replication
until every dc in the forest has the schema changes.

The avoids an endless loop trying to get schema in sync with the partner.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=12115

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-08-11 00:49:14 +02:00
Stefan Metzmacher
386dbc428b s4:dsdb/schema: store struct dsdb_schema_info instead of a hexstring
This will simplify the schema checking in future.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=12115

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-08-11 00:49:14 +02:00
Jelmer Vernooij
fc720be5a2 source4/torture: Fix prototypes for all functions. 2011-03-19 03:20:05 +01:00
Andrew Tridgell
8dc92c8f71 ldb: use #include <ldb.h> for ldb
thi ensures we are using the header corresponding to the version of
ldb we're linking against. Otherwise we could use the system ldb for
link and the in-tree one for include

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-02-10 06:51:07 +01:00
Andrew Tridgell
87f3151047 s4-dsdb: pass parent request to dsdb_module_*() functions
this preserves the request hierarchy for dsdb_module_*() calls inside
dsdb ldb modules

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-01-17 05:23:04 +01:00
Jelmer Vernooij
35fbc7bbda s4-smbtorture: Make test names lowercase and dot-separated.
This is consistent with the test names used by selftest, should
make the names less confusing and easier to integrate with other tools.

Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Sat Dec 11 04:16:13 CET 2010 on sn-devel-104
2010-12-11 04:16:13 +01:00
Kamen Mazdrashki
72189aef8d s4-pfm_test: Use single instance of global testing data to test with 2010-10-29 02:31:16 +03:00
Kamen Mazdrashki
fbc3fc2e5f s4-pfm-test: Enrich and fix comment primary for testing data 2010-10-29 02:31:16 +03:00
Kamen Mazdrashki
6a6c7c9aa2 s4-pfm_test: no need to test created prefixMap contents here - it already tested 2010-10-26 22:17:41 +03:00
Kamen Mazdrashki
45e1c0c151 s4-pfm_test: Tests for dsdb_schema_pfm_attid_from_oid() 2010-10-26 22:17:41 +03:00
Andrew Tridgell
47591ea5ec s4-dsdb: moved a bunch of fuctions from schema/schema_info_attr.c to samdb/ldb_modules/schema_util.c
these functions operate on ldb_modules, so they should be in the
ldb_modules directory. They also should return ldb errors codes, not
WERROR codes, as otherwise the error can be hidden from the ldap
caller

This re-arrangement fixes a dependency loop in the schema/samdb code.

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Pair-Programmed-With: Kamen Mazdrashki <kamenim@samba.org>
2010-10-21 19:03:25 +11:00
Kamen Mazdrashki
4752a6b6d7 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
2010-09-21 00:15:24 +03:00
Kamen Mazdrashki
311744a131 s4-test: Add unit test for dsdb_schema_info_cmp() 2010-09-17 13:53:04 +03:00
Stefan Metzmacher
6dbcffb51d s4:lib: merge LDB_WRAP and LDBSAMBA and make LDBSAMBA a library.
This is needed to remove samba specifc symbols from the bundled
ldb, in order to get the ABI right.

metze

Signed-off-by: Andreas Schneider <asn@samba.org>
2010-06-16 14:07:28 +02:00
Jelmer Vernooij
f9ca9e46ad Finish removal of iconv_convenience in public API's. 2010-05-18 11:45:30 +02:00
Kamen Mazdrashki
5a4ee75289 s4/tort: Add simple unit test for dsdb_schema_info object creation 2010-04-29 04:54:08 +03:00
Kamen Mazdrashki
59830d0a6e s4/dsdb: schemaInfo revision may be 0
In case schemaInfo value is still not set, WinAD supplies
schemaInfo blob with revision = 0 and GUID_ZERO
2010-04-29 04:54:07 +03:00
Kamen Mazdrashki
a8438015ca s4/dsdb: remove unused dsdb_schema_info_create() function 2010-04-29 04:54:07 +03:00
Andrew Tridgell
2edff9f5ff s4-drs: accept zero revision in drs selftest
Kamen, please have a look at this. We need to accept revision zero as
w2k8r2 sends it during initial schema replication

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-04-21 13:35:56 +10:00
Matthias Dieter Wallnöfer
ad9e407357 Revert "s4:prefer "samdb_*_dn" basedn calls over the "ldb_get_*_dn" functions"
We should use the "ldb_get_*_basedn" calls since they are available in the LDB
library.
2010-04-13 08:55:15 +02:00
Kamen Mazdrashki
fbef33fb73 s4/dsdb: Let caller to control if valid invocationId is critical or zero-guid is acceptable 2010-04-09 12:21:33 +03:00
Kamen Mazdrashki
e5ef11f4e2 s4/test: Use drsut_schemainfo_new() instead of SCHEMA_INFO_DEFAULT local define 2010-04-09 12:21:31 +03:00
Kamen Mazdrashki
526e62c46f s4/tort: Unit test for schemaInfo implementation 2010-04-09 12:21:27 +03:00
Kamen Mazdrashki
911cefd48b s4-tort: Test handling of different ATTID values in prefixMap interface.
It turns out ATTID values are separated in ranges.
Ref: MS-ADTS, 3.1.1.2.6 ATTRTYP

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2009-12-21 23:45:12 +11:00
Kamen Mazdrashki
03a1451bbc s4-drstest: Don't remove temp LDB so it can be reviewed if necessary
This test makes temp directory which is not removed
so why not just leave LDB also.

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2009-12-21 23:43:17 +11:00
Andrew Tridgell
0920e0b63b s4-drstest: don't use getenv("LDB_URL") in test suites
I was stumped for a while as to why the drs test suite was failing for
me. It turned out that it looked for LDB_URL in the environment, and
used it if set. I had it set in my terminal, and it was happily
munching on my sam.ldb while testing. Quite a cute bug really :-)
2009-11-27 16:05:06 +11:00
Kamen Mazdrashki
2fa4c4dcee s4/drs(tort): _torture_drs_pfm_compare_same() should not fail tctx by itself
The responsibility for failing torture_context sould be for the
caller.
This gives better control in for test case driver function.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2009-11-06 14:05:49 +01:00
Kamen Mazdrashki
ef959b42ca s4/drs(tort): Test case for dsdb_create_prefix_mapping() implemented
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2009-11-06 14:05:49 +01:00
Kamen Mazdrashki
009361e1ff s4/drs(tort): refactor - SCHEMA_INFO_DEFAULT defined on file scope
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2009-11-06 14:05:47 +01:00
Kamen Mazdrashki
b50df3bd7f s4/drs(tort): prefixMap read/write in LDB test case
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2009-11-06 14:05:46 +01:00
Kamen Mazdrashki
6a32200667 s4/drs(tort): Create temporary LDB for testing purposes
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2009-11-06 14:05:46 +01:00
Kamen Mazdrashki
20622de49f s4/drs(tort): prefixMap to/from ldb_val serialization test case
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2009-11-06 14:05:44 +01:00
Kamen Mazdrashki
fc05386c0d s4/drs: dsdb_schema_pfm_from_drsuapi_pfm() to accept partial drsuapi_prefixMap
"partial drsuapi_prefixMap" is a prefix map without last entry
being special - i.e. map that does not contains schema_info entry.

Test for dsdb_schema_pfm_from_drsuapi_pfm() were also extended to
cover both 'full' and 'partial' map conversion.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2009-11-06 14:05:44 +01:00
Kamen Mazdrashki
5446123190 s4/drs(tort): test for schema_prefixMap to/from drsuapi_prefixMap conversion
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2009-11-06 14:05:39 +01:00
Kamen Mazdrashki
3d91c8ef5a s4/drs(tort): implement prefixMap comparison function
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2009-11-06 14:05:38 +01:00
Stefan Metzmacher
be06d5ccb4 s4:torture/drs: move intern/ => unit/
metze
2009-11-06 14:05:36 +01:00