From 4dea78d5084e0eed4b80dced087d71aa60b1fd3a Mon Sep 17 00:00:00 2001 From: Dave Craft Date: Tue, 5 Jul 2011 21:22:31 -0500 Subject: KCC NTDSConnection should utilize NTDSCONN_OPT_IS_GENERATED Previously this set an explicit (0x1) value whereas it can now utilize NTDSCONN_OPT_IS_GENERATED from flags.h Signed-off-by: Andrew Tridgell --- source4/dsdb/kcc/kcc_connection.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'source4/dsdb/kcc') diff --git a/source4/dsdb/kcc/kcc_connection.c b/source4/dsdb/kcc/kcc_connection.c index 66cd41557f..1c4ebb1581 100644 --- a/source4/dsdb/kcc/kcc_connection.c +++ b/source4/dsdb/kcc/kcc_connection.c @@ -80,7 +80,9 @@ static int kccsrv_add_connection(struct kccsrv_service *s, ldb_msg_add_string(msg, "enabledConnection", "TRUE"); ldb_msg_add_linearized_dn(msg, "fromServer", server_dn); /* ldb_msg_add_value(msg, "schedule", &schedule_val, NULL); */ - samdb_msg_add_uint(s->samdb, msg, msg, "options", 1); + + samdb_msg_add_uint(s->samdb, msg, msg, + "options", NTDSCONN_OPT_IS_GENERATED); ret = ldb_add(s->samdb, msg); if (ret == LDB_SUCCESS) { @@ -132,6 +134,12 @@ void kccsrv_apply_connections(struct kccsrv_service *s, unsigned int i, j, deleted = 0, added = 0; int ret; + /* XXX + * + * This routine is not respecting connections that the + * administrator can specifically create (NTDSCONN_OPT_IS_GENERATED + * bit will not be set) + */ for (i = 0; ntds_list && i < ntds_list->count; i++) { struct kcc_connection *ntds = &ntds_list->servers[i]; for (j = 0; j < dsa_list->count; j++) { -- cgit