[SCM] Samba Shared Repository - branch master updated
Douglas Bagnall
dbagnall at samba.org
Wed Sep 20 04:29:02 UTC 2017
The branch, master has been updated
via 3e1870c kcc: Remove unused, untested KCC code
via dd53be2 ldap_server: Plumb ldb error string from a failed connect to ldapsrv_terminate_connection()
via c1e41d4 samdb: Rework samdb_connect_url() to return LDB error code and an error string
via 6c28abc ldb: Release 1.2.3
via f5f3657 ldb: Add tests for read only behaviour
via 22854f9 ldb_tdb: Change ltdb_connect() NOT to request a kernel-level read only TDB
via 13777d3 ldb_tdb: Give a debug message as well as setting the error string if prepare_commit() fails
via 75e88e4 ldb_tdb: Map TDB error codes into LDB error codes in ltdb_lock_read()
from 24996c6 ctdb-tools: Fix a typo for a talloc context
https://git.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 3e1870c26c7cd339c66ace96cb0a7ddc2d1777f0
Author: Garming Sam <garming at catalyst.net.nz>
Date: Mon Sep 18 09:55:21 2017 +1200
kcc: Remove unused, untested KCC code
This code tries to implement the full KCC algorithm, but never
actually worked correctly.
Removing this doesn't affect the full-mesh KCC. This code only
attempted to calculate a graph using the "proper" algorithm, though it
neglected to write its results back into the database. The full-mesh
calculation occurs elsewhere.
Signed-off-by: Garming Sam <garming at catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Autobuild-User(master): Douglas Bagnall <dbagnall at samba.org>
Autobuild-Date(master): Wed Sep 20 06:28:07 CEST 2017 on sn-devel-144
commit dd53be2756b7b9d446e9fd8549e71177b6c9d356
Author: Andrew Bartlett <abartlet at samba.org>
Date: Thu Sep 14 15:07:10 2017 +1200
ldap_server: Plumb ldb error string from a failed connect to ldapsrv_terminate_connection()
However, do not plumb it to the client-seen error string, as it could contain server paths.
Signed-off-by: Andrew Bartlett <abartlet at samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
commit c1e41d489d8b199ad1f7f1546ae50461cda0fbce
Author: Andrew Bartlett <abartlet at samba.org>
Date: Thu Sep 14 15:02:36 2017 +1200
samdb: Rework samdb_connect_url() to return LDB error code and an error string
This allows debugging of why the LDB failed to start up.
Signed-off-by: Andrew Bartlett <abartlet at samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
commit 6c28abc249f83a1083a71b2d526098d42c4f5c14
Author: Andrew Bartlett <abartlet at samba.org>
Date: Thu Sep 14 14:44:39 2017 +1200
ldb: Release 1.2.3
* Bug #13033 LDB open with LDB_FLG_RDONLY can cause the database
to fail to open
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13033
Signed-off-by: Andrew Bartlett <abartlet at samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
commit f5f3657c485cd1aa854895e6a40a55ff6a0651f9
Author: Gary Lockyer <gary at catalyst.net.nz>
Date: Thu Sep 14 11:37:41 2017 +1200
ldb: Add tests for read only behaviour
As the kernel is no longer enforcing the read-only DB
add some tests.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13033
Signed-off-by: Gary Lockyer <gary at catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
commit 22854f9b8def835d91dde3672cd17a2a273dec6e
Author: Andrew Bartlett <abartlet at samba.org>
Date: Mon Sep 18 10:43:32 2017 +1200
ldb_tdb: Change ltdb_connect() NOT to request a kernel-level read only TDB
We support opening and LDB multiple times in a process, but do not support this in tdb.
As we can open the ldb with different flags, we must ensure a later read-write
open is possible.
Additionally, a read-only TDB will refuse the all-record lock, preventing
the ldb from even loading.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13033
Signed-off-by: Andrew Bartlett <abartlet at samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
commit 13777d35d0be8d7e90fb3610c8c374e03415b9fd
Author: Andrew Bartlett <abartlet at samba.org>
Date: Thu Sep 14 15:01:39 2017 +1200
ldb_tdb: Give a debug message as well as setting the error string if prepare_commit() fails
This is a serious condition, and should be logged.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13033
Signed-off-by: Andrew Bartlett <abartlet at samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
commit 75e88e40a2c66668a95f00e151efe18c365580fd
Author: Andrew Bartlett <abartlet at samba.org>
Date: Thu Sep 14 14:04:51 2017 +1200
ldb_tdb: Map TDB error codes into LDB error codes in ltdb_lock_read()
The ltdb_lock_read() routine did not return an LDB error code, but -1.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13033
Signed-off-by: Gary Lockyer <gary at catalyst.net.nz>
Signed-off-by: Andrew Bartlett <abartlet at samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
-----------------------------------------------------------------------
Summary of changes:
lib/ldb/ABI/{ldb-1.2.2.sigs => ldb-1.2.3.sigs} | 0
...yldb-util-1.1.10.sigs => pyldb-util-1.2.3.sigs} | 0
...-util-1.1.10.sigs => pyldb-util.py3-1.2.3.sigs} | 0
lib/ldb/ldb_tdb/ldb_index.c | 13 +
lib/ldb/ldb_tdb/ldb_tdb.c | 70 +-
lib/ldb/ldb_tdb/ldb_tdb.h | 2 +
lib/ldb/tests/ldb_mod_op_test.c | 152 +
lib/ldb/wscript | 2 +-
source3/passdb/pdb_samba_dsdb.c | 25 +-
source4/dns_server/dlz_bind9.c | 15 +-
source4/dsdb/kcc/kcc_connection.c | 1 -
source4/dsdb/kcc/kcc_topology.c | 3564 --------------------
source4/dsdb/samdb/samdb.c | 60 +-
source4/dsdb/wscript_build | 2 +-
source4/ldap_server/ldap_backend.c | 24 +-
source4/ldap_server/ldap_bind.c | 34 +-
source4/ldap_server/ldap_server.c | 10 +-
source4/torture/dns/dlz_bind9.c | 14 +-
18 files changed, 343 insertions(+), 3645 deletions(-)
copy lib/ldb/ABI/{ldb-1.2.2.sigs => ldb-1.2.3.sigs} (100%)
copy lib/ldb/ABI/{pyldb-util-1.1.10.sigs => pyldb-util-1.2.3.sigs} (100%)
copy lib/ldb/ABI/{pyldb-util-1.1.10.sigs => pyldb-util.py3-1.2.3.sigs} (100%)
delete mode 100644 source4/dsdb/kcc/kcc_topology.c
Changeset truncated at 500 lines:
diff --git a/lib/ldb/ABI/ldb-1.2.2.sigs b/lib/ldb/ABI/ldb-1.2.3.sigs
similarity index 100%
copy from lib/ldb/ABI/ldb-1.2.2.sigs
copy to lib/ldb/ABI/ldb-1.2.3.sigs
diff --git a/lib/ldb/ABI/pyldb-util-1.1.10.sigs b/lib/ldb/ABI/pyldb-util-1.2.3.sigs
similarity index 100%
copy from lib/ldb/ABI/pyldb-util-1.1.10.sigs
copy to lib/ldb/ABI/pyldb-util-1.2.3.sigs
diff --git a/lib/ldb/ABI/pyldb-util-1.1.10.sigs b/lib/ldb/ABI/pyldb-util.py3-1.2.3.sigs
similarity index 100%
copy from lib/ldb/ABI/pyldb-util-1.1.10.sigs
copy to lib/ldb/ABI/pyldb-util.py3-1.2.3.sigs
diff --git a/lib/ldb/ldb_tdb/ldb_index.c b/lib/ldb/ldb_tdb/ldb_index.c
index 3510dd9..7b36ac4 100644
--- a/lib/ldb/ldb_tdb/ldb_index.c
+++ b/lib/ldb/ldb_tdb/ldb_index.c
@@ -310,6 +310,11 @@ static int ltdb_dn_list_store(struct ldb_module *module, struct ldb_dn *dn,
rec.dptr = (uint8_t *)&list2;
rec.dsize = sizeof(void *);
+
+ /*
+ * This is not a store into the main DB, but into an in-memory
+ * TDB, so we don't need a guard on ltdb->read_only
+ */
ret = tdb_store(ltdb->idxptr->itdb, key, rec, TDB_INSERT);
if (ret != 0) {
return ltdb_err_map(tdb_error(ltdb->idxptr->itdb));
@@ -1760,6 +1765,14 @@ int ltdb_reindex(struct ldb_module *module)
int ret;
struct ltdb_reindex_context ctx;
+ /*
+ * Only triggered after a modification, but make clear we do
+ * not re-index a read-only DB
+ */
+ if (ltdb->read_only) {
+ return LDB_ERR_UNWILLING_TO_PERFORM;
+ }
+
if (ltdb_cache_reload(module) != 0) {
return LDB_ERR_OPERATIONS_ERROR;
}
diff --git a/lib/ldb/ldb_tdb/ldb_tdb.c b/lib/ldb/ldb_tdb/ldb_tdb.c
index ccad816..ca5b82e 100644
--- a/lib/ldb/ldb_tdb/ldb_tdb.c
+++ b/lib/ldb/ldb_tdb/ldb_tdb.c
@@ -98,15 +98,26 @@ int ltdb_lock_read(struct ldb_module *module)
{
void *data = ldb_module_get_private(module);
struct ltdb_private *ltdb = talloc_get_type(data, struct ltdb_private);
- int ret = 0;
+ int tdb_ret = 0;
+ int ret;
if (ltdb->in_transaction == 0 &&
ltdb->read_lock_count == 0) {
- ret = tdb_lockall_read(ltdb->tdb);
+ tdb_ret = tdb_lockall_read(ltdb->tdb);
}
- if (ret == 0) {
+ if (tdb_ret == 0) {
ltdb->read_lock_count++;
+ return LDB_SUCCESS;
+ }
+ ret = ltdb_err_map(tdb_error(ltdb->tdb));
+ if (ret == LDB_SUCCESS) {
+ ret = LDB_ERR_OPERATIONS_ERROR;
}
+ ldb_debug_set(ldb_module_get_ctx(module),
+ LDB_DEBUG_FATAL,
+ "Failure during ltdb_lock_read(): %s -> %s",
+ tdb_errorstr(ltdb->tdb),
+ ldb_strerror(ret));
return ret;
}
@@ -297,6 +308,10 @@ int ltdb_store(struct ldb_module *module, const struct ldb_message *msg, int flg
struct ldb_val ldb_data;
int ret = LDB_SUCCESS;
+ if (ltdb->read_only) {
+ return LDB_ERR_UNWILLING_TO_PERFORM;
+ }
+
tdb_key = ltdb_key(module, msg->dn);
if (tdb_key.dptr == NULL) {
return LDB_ERR_OTHER;
@@ -465,6 +480,10 @@ int ltdb_delete_noindex(struct ldb_module *module, struct ldb_dn *dn)
TDB_DATA tdb_key;
int ret;
+ if (ltdb->read_only) {
+ return LDB_ERR_UNWILLING_TO_PERFORM;
+ }
+
tdb_key = ltdb_key(module, dn);
if (!tdb_key.dptr) {
return LDB_ERR_OTHER;
@@ -1154,6 +1173,11 @@ static int ltdb_start_trans(struct ldb_module *module)
void *data = ldb_module_get_private(module);
struct ltdb_private *ltdb = talloc_get_type(data, struct ltdb_private);
+ /* Do not take out the transaction lock on a read-only DB */
+ if (ltdb->read_only) {
+ return LDB_ERR_UNWILLING_TO_PERFORM;
+ }
+
if (tdb_transaction_start(ltdb->tdb) != 0) {
return ltdb_err_map(tdb_error(ltdb->tdb));
}
@@ -1185,10 +1209,12 @@ static int ltdb_prepare_commit(struct ldb_module *module)
if (tdb_transaction_prepare_commit(ltdb->tdb) != 0) {
ret = ltdb_err_map(tdb_error(ltdb->tdb));
ltdb->in_transaction--;
- ldb_asprintf_errstring(ldb_module_get_ctx(module),
- "Failure during tdb_transaction_prepare_commit(): %s -> %s",
- tdb_errorstr(ltdb->tdb),
- ldb_strerror(ret));
+ ldb_debug_set(ldb_module_get_ctx(module),
+ LDB_DEBUG_FATAL,
+ "Failure during "
+ "tdb_transaction_prepare_commit(): %s -> %s",
+ tdb_errorstr(ltdb->tdb),
+ ldb_strerror(ret));
return ret;
}
@@ -1635,20 +1661,36 @@ static int ltdb_connect(struct ldb_context *ldb, const char *url,
tdb_flags |= TDB_NOMMAP;
}
+ ltdb = talloc_zero(ldb, struct ltdb_private);
+ if (!ltdb) {
+ ldb_oom(ldb);
+ return LDB_ERR_OPERATIONS_ERROR;
+ }
+
if (flags & LDB_FLG_RDONLY) {
- open_flags = O_RDONLY;
+ /*
+ * This is weird, but because we can only have one tdb
+ * in this process, and the other one could be
+ * read-write, we can't use the tdb readonly. Plus a
+ * read only tdb prohibits the all-record lock.
+ */
+ open_flags = O_RDWR;
+
+ ltdb->read_only = true;
+
} else if (flags & LDB_FLG_DONT_CREATE_DB) {
+ /*
+ * This is used by ldbsearch to prevent creation of the database
+ * if the name is wrong
+ */
open_flags = O_RDWR;
} else {
+ /*
+ * This is the normal case
+ */
open_flags = O_CREAT | O_RDWR;
}
- ltdb = talloc_zero(ldb, struct ltdb_private);
- if (!ltdb) {
- ldb_oom(ldb);
- return LDB_ERR_OPERATIONS_ERROR;
- }
-
/* note that we use quite a large default hash size */
ltdb->tdb = ltdb_wrap_open(ltdb, path, 10000,
tdb_flags, open_flags,
diff --git a/lib/ldb/ldb_tdb/ldb_tdb.h b/lib/ldb/ldb_tdb/ldb_tdb.h
index a391606..88cec3e 100644
--- a/lib/ldb/ldb_tdb/ldb_tdb.h
+++ b/lib/ldb/ldb_tdb/ldb_tdb.h
@@ -32,6 +32,8 @@ struct ltdb_private {
bool warn_unindexed;
bool warn_reindex;
+
+ bool read_only;
};
struct ltdb_context {
diff --git a/lib/ldb/tests/ldb_mod_op_test.c b/lib/ldb/tests/ldb_mod_op_test.c
index 5e439f8..48ad20c 100644
--- a/lib/ldb/tests/ldb_mod_op_test.c
+++ b/lib/ldb/tests/ldb_mod_op_test.c
@@ -2861,6 +2861,155 @@ static void test_ldb_rename_dn_case_change(void **state)
/* FIXME - test the values didn't change */
}
+static int ldb_read_only_setup(void **state)
+{
+ struct ldbtest_ctx *test_ctx;
+
+ ldbtest_setup((void **) &test_ctx);
+
+ *state = test_ctx;
+ return 0;
+}
+
+static int ldb_read_only_teardown(void **state)
+{
+ struct ldbtest_ctx *test_ctx = talloc_get_type_abort(*state,
+ struct ldbtest_ctx);
+ ldbtest_teardown((void **) &test_ctx);
+ return 0;
+}
+
+static void test_read_only(void **state)
+{
+ struct ldb_context *ro_ldb = NULL;
+ struct ldb_context *rw_ldb = NULL;
+ int ret;
+ TALLOC_CTX *tmp_ctx = NULL;
+
+ struct ldbtest_ctx *test_ctx = talloc_get_type_abort(*state,
+ struct ldbtest_ctx);
+ /*
+ * Close the ldb context freeing it this will ensure it exists on
+ * disk and can be opened in read only mode
+ */
+ TALLOC_FREE(test_ctx->ldb);
+
+ /*
+ * Open the database in read only and read write mode,
+ * ensure it's opend in read only mode first
+ */
+ ro_ldb = ldb_init(test_ctx, test_ctx->ev);
+ ret = ldb_connect(ro_ldb, test_ctx->dbpath, LDB_FLG_RDONLY, NULL);
+ assert_int_equal(ret, 0);
+
+ rw_ldb = ldb_init(test_ctx, test_ctx->ev);
+ ret = ldb_connect(rw_ldb, test_ctx->dbpath, 0, NULL);
+ assert_int_equal(ret, 0);
+
+
+ /*
+ * Set up a context for the temporary variables
+ */
+ tmp_ctx = talloc_new(test_ctx);
+ assert_non_null(tmp_ctx);
+
+ /*
+ * Ensure that we can search the read write database
+ */
+ {
+ struct ldb_result *result = NULL;
+ struct ldb_dn *dn = ldb_dn_new_fmt(tmp_ctx, rw_ldb,
+ "dc=test");
+ assert_non_null(dn);
+
+ ret = ldb_search(rw_ldb, tmp_ctx, &result, dn,
+ LDB_SCOPE_BASE, NULL, NULL);
+ assert_int_equal(ret, LDB_SUCCESS);
+ TALLOC_FREE(result);
+ TALLOC_FREE(dn);
+ }
+
+ /*
+ * Ensure that we can search the read only database
+ */
+ {
+ struct ldb_result *result = NULL;
+ struct ldb_dn *dn = ldb_dn_new_fmt(tmp_ctx, ro_ldb,
+ "dc=test");
+ assert_non_null(dn);
+
+ ret = ldb_search(ro_ldb, tmp_ctx, &result, dn,
+ LDB_SCOPE_BASE, NULL, NULL);
+ assert_int_equal(ret, LDB_SUCCESS);
+ TALLOC_FREE(result);
+ TALLOC_FREE(dn);
+ }
+ /*
+ * Ensure that a write to the read only database fails
+ */
+ {
+ struct ldb_message *msg = NULL;
+ msg = ldb_msg_new(tmp_ctx);
+ assert_non_null(msg);
+
+ msg->dn = ldb_dn_new_fmt(msg, ro_ldb, "dc=test");
+ assert_non_null(msg->dn);
+
+ ret = ldb_msg_add_string(msg, "cn", "test_cn_val");
+ assert_int_equal(ret, 0);
+
+ ret = ldb_add(ro_ldb, msg);
+ assert_int_equal(ret, LDB_ERR_UNWILLING_TO_PERFORM);
+ TALLOC_FREE(msg);
+ }
+
+ /*
+ * Ensure that a write to the read write database succeeds
+ */
+ {
+ struct ldb_message *msg = NULL;
+ msg = ldb_msg_new(tmp_ctx);
+ assert_non_null(msg);
+
+ msg->dn = ldb_dn_new_fmt(msg, ro_ldb, "dc=test");
+ assert_non_null(msg->dn);
+
+ ret = ldb_msg_add_string(msg, "cn", "test_cn_val");
+ assert_int_equal(ret, 0);
+
+ ret = ldb_add(rw_ldb, msg);
+ assert_int_equal(ret, LDB_SUCCESS);
+ TALLOC_FREE(msg);
+ }
+
+ /*
+ * Ensure that a delete from a read only database fails
+ */
+ {
+ struct ldb_dn *dn = ldb_dn_new_fmt(tmp_ctx, ro_ldb, "dc=test");
+ assert_non_null(dn);
+
+ ret = ldb_delete(ro_ldb, dn);
+ assert_int_equal(ret, LDB_ERR_UNWILLING_TO_PERFORM);
+ TALLOC_FREE(dn);
+ }
+
+
+ /*
+ * Ensure that a delete from a read write succeeds
+ */
+ {
+ struct ldb_dn *dn = ldb_dn_new_fmt(tmp_ctx, rw_ldb, "dc=test");
+ assert_non_null(dn);
+
+ ret = ldb_delete(rw_ldb, dn);
+ assert_int_equal(ret, LDB_SUCCESS);
+ TALLOC_FREE(dn);
+ }
+ TALLOC_FREE(tmp_ctx);
+}
+
+
int main(int argc, const char **argv)
{
const struct CMUnitTest tests[] = {
@@ -2981,6 +3130,9 @@ int main(int argc, const char **argv)
cmocka_unit_test_setup_teardown(test_ldb_rename_dn_case_change,
ldb_rename_test_setup,
ldb_rename_test_teardown),
+ cmocka_unit_test_setup_teardown(test_read_only,
+ ldb_read_only_setup,
+ ldb_read_only_teardown),
};
return cmocka_run_group_tests(tests, NULL, NULL);
diff --git a/lib/ldb/wscript b/lib/ldb/wscript
index bd17b7b..5ea5231 100644
--- a/lib/ldb/wscript
+++ b/lib/ldb/wscript
@@ -1,7 +1,7 @@
#!/usr/bin/env python
APPNAME = 'ldb'
-VERSION = '1.2.2'
+VERSION = '1.2.3'
blddir = 'bin'
diff --git a/source3/passdb/pdb_samba_dsdb.c b/source3/passdb/pdb_samba_dsdb.c
index cfa492b..58168d8 100644
--- a/source3/passdb/pdb_samba_dsdb.c
+++ b/source3/passdb/pdb_samba_dsdb.c
@@ -3023,6 +3023,8 @@ static NTSTATUS pdb_init_samba_dsdb(struct pdb_methods **pdb_method,
struct pdb_methods *m;
struct pdb_samba_dsdb_state *state;
NTSTATUS status;
+ char *errstring = NULL;
+ int ret;
if ( !NT_STATUS_IS_OK(status = make_pdb_method( &m )) ) {
return status;
@@ -3048,21 +3050,20 @@ static NTSTATUS pdb_init_samba_dsdb(struct pdb_methods **pdb_method,
goto nomem;
}
- if (location) {
- state->ldb = samdb_connect_url(state,
- state->ev,
- state->lp_ctx,
- system_session(state->lp_ctx),
- 0, location);
- } else {
- state->ldb = samdb_connect(state,
- state->ev,
- state->lp_ctx,
- system_session(state->lp_ctx), 0);
+ if (location == NULL) {
+ location = "sam.ldb";
}
+ ret = samdb_connect_url(state,
+ state->ev,
+ state->lp_ctx,
+ system_session(state->lp_ctx),
+ 0, location,
+ &state->ldb, &errstring);
+
if (!state->ldb) {
- DEBUG(0, ("samdb_connect failed\n"));
+ DEBUG(0, ("samdb_connect failed: %s: %s\n",
+ errstring, ldb_strerror(ret)));
status = NT_STATUS_INTERNAL_ERROR;
goto fail;
}
diff --git a/source4/dns_server/dlz_bind9.c b/source4/dns_server/dlz_bind9.c
index 9bf1b61..cf171cb 100644
--- a/source4/dns_server/dlz_bind9.c
+++ b/source4/dns_server/dlz_bind9.c
@@ -614,6 +614,8 @@ _PUBLIC_ isc_result_t dlz_create(const char *dlzname,
isc_result_t result;
struct ldb_dn *dn;
NTSTATUS nt_status;
+ int ret;
+ char *errstring = NULL;
if (dlz_bind9_state != NULL) {
*dbdata = dlz_bind9_state;
@@ -701,11 +703,14 @@ _PUBLIC_ isc_result_t dlz_create(const char *dlzname,
}
}
- state->samdb = samdb_connect_url(state, state->ev_ctx, state->lp,
- system_session(state->lp), 0, state->options.url);
- if (state->samdb == NULL) {
- state->log(ISC_LOG_ERROR, "samba_dlz: Failed to connect to %s",
- state->options.url);
+ ret = samdb_connect_url(state, state->ev_ctx, state->lp,
+ system_session(state->lp), 0,
+ state->options.url,
+ &state->samdb, &errstring);
+ if (ret != LDB_SUCCESS) {
+ state->log(ISC_LOG_ERROR,
+ "samba_dlz: Failed to connect to %s: %s",
+ errstring, ldb_strerror(ret));
result = ISC_R_FAILURE;
goto failed;
}
diff --git a/source4/dsdb/kcc/kcc_connection.c b/source4/dsdb/kcc/kcc_connection.c
index f85ed13..6a20dea 100644
--- a/source4/dsdb/kcc/kcc_connection.c
+++ b/source4/dsdb/kcc/kcc_connection.c
@@ -190,7 +190,6 @@ struct kcc_connection_list *kccsrv_find_connections(struct kccsrv_service *s,
const char *attrs[] = { "objectGUID", "fromServer", NULL };
struct kcc_connection_list *list;
TALLOC_CTX *tmp_ctx;
- kcctpl_test(s);
tmp_ctx = talloc_new(mem_ctx);
if (!tmp_ctx) {
diff --git a/source4/dsdb/kcc/kcc_topology.c b/source4/dsdb/kcc/kcc_topology.c
deleted file mode 100644
index 0e136ed..0000000
--- a/source4/dsdb/kcc/kcc_topology.c
+++ /dev/null
@@ -1,3564 +0,0 @@
-/*
- Unix SMB/CIFS implementation.
-
- KCC service
-
- Copyright (C) CrÃstian Deives 2010
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-*/
-
-#include "includes.h"
-#include "dsdb/samdb/samdb.h"
-#include "lib/messaging/irpc.h"
-#include "librpc/gen_ndr/ndr_misc.h"
-#include "dsdb/kcc/kcc_service.h"
-
-#define FLAG_CR_NTDS_NC 0x00000001
-#define FLAG_CR_NTDS_DOMAIN 0x00000002
-
-#define NTDSDSA_OPT_IS_GC 0x00000001
-
-#define NTDSSETTINGS_OPT_IS_TOPL_DETECT_STALE_DISABLED 0x00000008
-#define NTDSSETTINGS_OPT_IS_RAND_BH_SELECTION_DISABLED 0x00000100
--
Samba Shared Repository
More information about the samba-cvs
mailing list