diff options
author | Stefan Metzmacher <metze@samba.org> | 2010-09-03 12:09:36 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2010-09-03 17:00:20 +0200 |
commit | 5c73c84f291573e835e9286c8b3a0831bc3c7dad (patch) | |
tree | a8f2512c3d040baa081ad1ec3755fd7dc10d7a0c | |
parent | e117177307fe42e0e6ef92ee66df1154ffe3b9ec (diff) | |
download | samba-5c73c84f291573e835e9286c8b3a0831bc3c7dad.tar.gz samba-5c73c84f291573e835e9286c8b3a0831bc3c7dad.tar.bz2 samba-5c73c84f291573e835e9286c8b3a0831bc3c7dad.zip |
s4:rpc_server/netlogon: use irpc_binding_handle_by_name()
metze
-rw-r--r-- | source4/rpc_server/netlogon/dcerpc_netlogon.c | 17 | ||||
-rw-r--r-- | source4/rpc_server/wscript_build | 2 |
2 files changed, 11 insertions, 8 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; } diff --git a/source4/rpc_server/wscript_build b/source4/rpc_server/wscript_build index ba6d2f575f..dca6eaac08 100644 --- a/source4/rpc_server/wscript_build +++ b/source4/rpc_server/wscript_build @@ -80,7 +80,7 @@ bld.SAMBA_MODULE('dcerpc_netlogon', source='netlogon/dcerpc_netlogon.c', subsystem='dcerpc_server', init_function='dcerpc_server_netlogon_init', - deps='DCERPC_COMMON SCHANNELDB NDR_STANDARD auth_sam LIBSAMBA-HOSTCONFIG' + deps='DCERPC_COMMON RPC_NDR_IRPC SCHANNELDB NDR_STANDARD auth_sam LIBSAMBA-HOSTCONFIG' ) |