The branch, master has been updated via 1229935 torture/becomedc: Add test for global schema, use samdb_connect(). via 24ec465 wafsamba: Warn about circular dependencies between libraries. from cda2db5 s3:registry: fix some trailing spaces in reg_backend_db
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log ----------------------------------------------------------------- commit 1229935aa91126130c25a7e24e9cb3e74f3a61f9 Author: Jelmer Vernooij <jel...@samba.org> Date: Tue Oct 12 19:53:47 2010 +0200 torture/becomedc: Add test for global schema, use samdb_connect(). Autobuild-User: Jelmer Vernooij <jel...@samba.org> Autobuild-Date: Tue Oct 12 18:35:33 UTC 2010 on sn-devel-104 commit 24ec465790a062db7720914ae9b2c10eaa36e070 Author: Jelmer Vernooij <jel...@samba.org> Date: Tue Oct 12 13:27:40 2010 +0200 wafsamba: Warn about circular dependencies between libraries. ----------------------------------------------------------------------- Summary of changes: buildtools/wafsamba/samba_deps.py | 2 +- source4/dsdb/schema/schema_set.c | 7 ++++++- source4/torture/libnet/libnet_BecomeDC.c | 14 ++++++++------ 3 files changed, 15 insertions(+), 8 deletions(-) Changeset truncated at 500 lines: diff --git a/buildtools/wafsamba/samba_deps.py b/buildtools/wafsamba/samba_deps.py index 94b7484..8bd8ad3 100644 --- a/buildtools/wafsamba/samba_deps.py +++ b/buildtools/wafsamba/samba_deps.py @@ -709,7 +709,7 @@ def calculate_final_deps(bld, tgt_list, loops): # we could break this in either direction. If one of the libraries # has a version number, and will this be distributed publicly, then # we should make it the lower level library in the DAG - debug('deps: removing library loop %s from %s', t.sname, t2.sname) + Logs.warn('deps: removing library loop %s from %s' % (t.sname, t2.sname)) dependency_loop(loops, t, t2.sname) t2.final_libs.remove(t.sname) diff --git a/source4/dsdb/schema/schema_set.c b/source4/dsdb/schema/schema_set.c index 4a4466a..2134115 100644 --- a/source4/dsdb/schema/schema_set.c +++ b/source4/dsdb/schema/schema_set.c @@ -487,6 +487,11 @@ int dsdb_set_global_schema(struct ldb_context *ldb) return ret; } +bool dsdb_uses_global_schema(struct ldb_context *ldb) +{ + return (ldb_get_opaque(ldb, "dsdb_use_global_schema") != NULL); +} + /** * Find the schema object for this ldb * @@ -505,7 +510,7 @@ struct dsdb_schema *dsdb_get_schema(struct ldb_context *ldb, TALLOC_CTX *referen } /* see if we have a cached copy */ - use_global_schema = (ldb_get_opaque(ldb, "dsdb_use_global_schema") != NULL); + use_global_schema = dsdb_uses_global_schema(ldb); if (use_global_schema) { schema_in = global_schema; } else { diff --git a/source4/torture/libnet/libnet_BecomeDC.c b/source4/torture/libnet/libnet_BecomeDC.c index 87d646c..0fbad00 100644 --- a/source4/torture/libnet/libnet_BecomeDC.c +++ b/source4/torture/libnet/libnet_BecomeDC.c @@ -144,16 +144,18 @@ bool torture_net_become_dc(struct torture_context *torture) lp_ctx = libnet_vampire_cb_lp_ctx(s); sam_ldb_path = talloc_asprintf(s, "%s/%s", location, "private/sam.ldb"); + lpcfg_set_cmdline(lp_ctx, "sam database", sam_ldb_path); torture_comment(torture, "Reopen the SAM LDB with system credentials and all replicated data: %s\n", sam_ldb_path); - ldb = ldb_wrap_connect(s, torture->ev, lp_ctx, sam_ldb_path, - system_session(lp_ctx), - NULL, 0); - torture_assert_int_equal_goto(torture, (ldb?1:0), 1, ret, cleanup, + ldb = samdb_connect(s, torture->ev, lp_ctx, system_session(lp_ctx), 0); + torture_assert_goto(torture, ldb != NULL, ret, cleanup, talloc_asprintf(torture, "Failed to open '%s'\n", sam_ldb_path)); + torture_assert_goto(torture, dsdb_uses_global_schema(ldb), ret, cleanup, + "Uses global schema"); + schema = dsdb_get_schema(ldb, s); - torture_assert_int_equal_goto(torture, (schema?1:0), 1, ret, cleanup, + torture_assert_goto(torture, schema != NULL, ret, cleanup, "Failed to get loaded dsdb_schema\n"); /* Make sure we get this from the command line */ @@ -174,7 +176,7 @@ cleanup: "libnet_UnbecomeDC() failed - %s %s\n", nt_errstr(status), u.out.error_string)); - /* Leave domain. */ + /* Leave domain. */ torture_leave_domain(torture, tj); talloc_free(s); -- Samba Shared Repository