summaryrefslogtreecommitdiff
path: root/source4/rpc_server/netlogon
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2010-09-03 12:09:36 +0200
committerStefan Metzmacher <metze@samba.org>2010-09-03 17:00:20 +0200
commit5c73c84f291573e835e9286c8b3a0831bc3c7dad (patch)
treea8f2512c3d040baa081ad1ec3755fd7dc10d7a0c /source4/rpc_server/netlogon
parente117177307fe42e0e6ef92ee66df1154ffe3b9ec (diff)
downloadsamba-5c73c84f291573e835e9286c8b3a0831bc3c7dad.tar.gz
samba-5c73c84f291573e835e9286c8b3a0831bc3c7dad.tar.bz2
samba-5c73c84f291573e835e9286c8b3a0831bc3c7dad.zip
s4:rpc_server/netlogon: use irpc_binding_handle_by_name()
metze
Diffstat (limited to 'source4/rpc_server/netlogon')
-rw-r--r--source4/rpc_server/netlogon/dcerpc_netlogon.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/source4/rpc_server/netlogon/dcerpc_netlogon.c b/source4/rpc_server/netlogon/dcerpc_netlogon.c
index a599822d9e..7dc8a76dad 100644
--- a/source4/rpc_server/netlogon/dcerpc_netlogon.c
+++ b/source4/rpc_server/netlogon/dcerpc_netlogon.c
@@ -31,7 +31,7 @@
#include "libcli/security/security.h"
#include "param/param.h"
#include "lib/messaging/irpc.h"
-#include "librpc/gen_ndr/ndr_irpc.h"
+#include "librpc/gen_ndr/ndr_irpc_c.h"
#include "../libcli/ldap/ldap_ndr.h"
#include "cldap_server/cldap_server.h"
#include "lib/tsocket/tsocket.h"
@@ -618,7 +618,7 @@ static NTSTATUS dcesrv_netr_LogonSamLogon_base(struct dcesrv_call_state *dce_cal
if (strcmp(r->in.logon->generic->package_name.string, "Kerberos") == 0) {
NTSTATUS status;
- struct server_id *kdc;
+ struct dcerpc_binding_handle *irpc_handle;
struct kdc_check_generic_kerberos check;
struct netr_GenericInfo2 *generic = talloc_zero(mem_ctx, struct netr_GenericInfo2);
NT_STATUS_HAVE_NO_MEMORY(generic);
@@ -629,8 +629,11 @@ static NTSTATUS dcesrv_netr_LogonSamLogon_base(struct dcesrv_call_state *dce_cal
r->out.validation->generic = generic;
- kdc = irpc_servers_byname(dce_call->msg_ctx, mem_ctx, "kdc_server");
- if ((kdc == NULL) || (kdc[0].id == 0)) {
+ irpc_handle = irpc_binding_handle_by_name(mem_ctx,
+ dce_call->msg_ctx,
+ "kdc_server",
+ &ndr_table_irpc);
+ if (irpc_handle == NULL) {
return NT_STATUS_NO_LOGON_SERVERS;
}
@@ -638,9 +641,9 @@ static NTSTATUS dcesrv_netr_LogonSamLogon_base(struct dcesrv_call_state *dce_cal
data_blob_const(r->in.logon->generic->data,
r->in.logon->generic->length);
- status = irpc_call(dce_call->msg_ctx, kdc[0],
- &ndr_table_irpc, NDR_KDC_CHECK_GENERIC_KERBEROS,
- &check, mem_ctx);
+ status = dcerpc_kdc_check_generic_kerberos_r(irpc_handle,
+ mem_ctx,
+ &check);
if (!NT_STATUS_IS_OK(status)) {
return status;
}