From ffc5cbfe803326a1c3bf55684717af910d091c5a Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 14 Apr 2008 16:53:00 +0200 Subject: Move object files lists to makefile rather than smb_build. (This used to be commit 5628d58990144463fd87f8c847c9384ac2193681) --- source4/kdc/config.mk | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'source4/kdc') diff --git a/source4/kdc/config.mk b/source4/kdc/config.mk index 479cb36296..94ba933e57 100644 --- a/source4/kdc/config.mk +++ b/source4/kdc/config.mk @@ -5,25 +5,22 @@ [MODULE::KDC] INIT_FUNCTION = server_service_kdc_init SUBSYSTEM = service -OBJ_FILES = \ - kdc.o \ - kpasswdd.o PRIVATE_DEPENDENCIES = \ - LIBLDB KERBEROS_LIB HEIMDAL_KDC HEIMDAL_HDB SAMDB + LIBLDB HEIMDAL HEIMDAL_KDC HEIMDAL_HDB SAMDB # End SUBSYSTEM KDC ####################### +KDC_OBJ_FILES = $(addprefix kdc/, kdc.o kpasswdd.o) + ####################### # Start SUBSYSTEM KDC [SUBSYSTEM::HDB_LDB] CFLAGS = -Iheimdal/kdc -Iheimdal/lib/hdb PRIVATE_PROTO_HEADER = pac_glue.h -OBJ_FILES = \ - hdb-ldb.o \ - pac-glue.o PRIVATE_DEPENDENCIES = \ - LIBLDB auth_sam auth_sam_reply KERBEROS CREDENTIALS \ + LIBLDB auth_sam auth_sam_reply HEIMDAL CREDENTIALS \ HEIMDAL_HDB_ASN1 # End SUBSYSTEM KDC ####################### +HDB_LDB_OBJ_FILES = $(addprefix kdc/, hdb-ldb.o pac-glue.o) -- cgit From 1efbd5fbf6b0f606ed29a763e2adfa6f99c6beac Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Thu, 17 Apr 2008 01:03:18 +0200 Subject: Remove event context tracking from the credentials struct. (This used to be commit 4d7fc946b2ec50e774689c9036423b6feef99b8e) --- source4/kdc/kpasswdd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/kdc') diff --git a/source4/kdc/kpasswdd.c b/source4/kdc/kpasswdd.c index f468fea6c4..3635676d17 100644 --- a/source4/kdc/kpasswdd.c +++ b/source4/kdc/kpasswdd.c @@ -474,7 +474,7 @@ bool kpasswdd_process(struct kdc_server *kdc, * we already have, rather than a new context */ cli_credentials_set_krb5_context(server_credentials, kdc->smb_krb5_context); cli_credentials_set_conf(server_credentials, kdc->task->lp_ctx); - nt_status = cli_credentials_set_stored_principal(server_credentials, kdc->task->lp_ctx, "kadmin/changepw"); + nt_status = cli_credentials_set_stored_principal(server_credentials, kdc->task->event_ctx, kdc->task->lp_ctx, "kadmin/changepw"); if (!NT_STATUS_IS_OK(nt_status)) { ret = kpasswdd_make_unauth_error_reply(kdc, mem_ctx, KRB5_KPASSWD_HARDERROR, -- cgit From 21fc7673780aa1d7c0caab7b17ff9171238913ba Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Thu, 17 Apr 2008 12:23:44 +0200 Subject: Specify event_context to ldb_wrap_connect explicitly. (This used to be commit b4e1ae07a284c044704322446c94351c2decff91) --- source4/kdc/hdb-ldb.c | 6 ++++-- source4/kdc/kdc.c | 2 +- source4/kdc/kpasswdd.c | 4 ++-- 3 files changed, 7 insertions(+), 5 deletions(-) (limited to 'source4/kdc') diff --git a/source4/kdc/hdb-ldb.c b/source4/kdc/hdb-ldb.c index d983b77b40..9c7b1f6457 100644 --- a/source4/kdc/hdb-ldb.c +++ b/source4/kdc/hdb-ldb.c @@ -50,6 +50,7 @@ #include "librpc/gen_ndr/ndr_drsblobs.h" #include "libcli/auth/libcli_auth.h" #include "param/param.h" +#include "events/events.h" enum hdb_ldb_ent_type { HDB_LDB_ENT_TYPE_CLIENT, HDB_LDB_ENT_TYPE_SERVER, @@ -1106,6 +1107,7 @@ static krb5_error_code LDB_destroy(krb5_context context, HDB *db) * code */ NTSTATUS kdc_hdb_ldb_create(TALLOC_CTX *mem_ctx, + struct event_context *ev_ctx, struct loadparm_context *lp_ctx, krb5_context context, struct HDB **db, const char *arg) { @@ -1137,7 +1139,7 @@ NTSTATUS kdc_hdb_ldb_create(TALLOC_CTX *mem_ctx, CRED_DONT_USE_KERBEROS); /* Setup the link to LDB */ - (*db)->hdb_db = samdb_connect(*db, lp_ctx, session_info); + (*db)->hdb_db = samdb_connect(*db, ev_ctx, lp_ctx, session_info); if ((*db)->hdb_db == NULL) { DEBUG(1, ("hdb_ldb_create: Cannot open samdb for KDC backend!")); return NT_STATUS_CANT_ACCESS_DOMAIN_INFO; @@ -1168,7 +1170,7 @@ krb5_error_code hdb_ldb_create(krb5_context context, struct HDB **db, const char { NTSTATUS nt_status; /* The global kdc_mem_ctx and kdc_lp_ctx, Disgusting, ugly hack, but it means one less private hook */ - nt_status = kdc_hdb_ldb_create(kdc_mem_ctx, kdc_lp_ctx, + nt_status = kdc_hdb_ldb_create(kdc_mem_ctx, event_context_find(kdc_mem_ctx), kdc_lp_ctx, context, db, arg); if (NT_STATUS_IS_OK(nt_status)) { diff --git a/source4/kdc/kdc.c b/source4/kdc/kdc.c index 72b5bb14a9..84d9d45f57 100644 --- a/source4/kdc/kdc.c +++ b/source4/kdc/kdc.c @@ -624,7 +624,7 @@ static void kdc_task_init(struct task_server *task) } kdc->config->num_db = 1; - status = kdc_hdb_ldb_create(kdc, task->lp_ctx, + status = kdc_hdb_ldb_create(kdc, task->event_ctx, task->lp_ctx, kdc->smb_krb5_context->krb5_context, &kdc->config->db[0], NULL); if (!NT_STATUS_IS_OK(status)) { diff --git a/source4/kdc/kpasswdd.c b/source4/kdc/kpasswdd.c index 3635676d17..1d49a8a4bd 100644 --- a/source4/kdc/kpasswdd.c +++ b/source4/kdc/kpasswdd.c @@ -180,7 +180,7 @@ static bool kpasswdd_change_password(struct kdc_server *kdc, struct samr_DomInfo1 *dominfo; struct ldb_context *samdb; - samdb = samdb_connect(mem_ctx, kdc->task->lp_ctx, system_session(mem_ctx, kdc->task->lp_ctx)); + samdb = samdb_connect(mem_ctx, kdc->task->event_ctx, kdc->task->lp_ctx, system_session(mem_ctx, kdc->task->lp_ctx)); if (!samdb) { return kpasswdd_make_error_reply(kdc, mem_ctx, KRB5_KPASSWD_HARDERROR, @@ -310,7 +310,7 @@ static bool kpasswd_process_request(struct kdc_server *kdc, krb5_free_principal(context, principal); - samdb = samdb_connect(mem_ctx, kdc->task->lp_ctx, session_info); + samdb = samdb_connect(mem_ctx, kdc->task->event_ctx, kdc->task->lp_ctx, session_info); if (!samdb) { return kpasswdd_make_error_reply(kdc, mem_ctx, KRB5_KPASSWD_HARDERROR, -- cgit