summaryrefslogtreecommitdiff
path: root/source4/auth/ntlm
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2010-09-03 16:59:05 +0200
committerStefan Metzmacher <metze@samba.org>2010-09-03 17:01:56 +0200
commit8202cf7966b8125ac175ceb8cef18037c9a8cc31 (patch)
treeb2724dd3f19c3a44c94f8c9910eb300c74c245c3 /source4/auth/ntlm
parent52d4a97afc4b09f860e84f059c419d33bfec18ff (diff)
downloadsamba-8202cf7966b8125ac175ceb8cef18037c9a8cc31.tar.gz
samba-8202cf7966b8125ac175ceb8cef18037c9a8cc31.tar.bz2
samba-8202cf7966b8125ac175ceb8cef18037c9a8cc31.zip
s4:auth_winbind: use irpc_binding_handle_by_name()
metze
Diffstat (limited to 'source4/auth/ntlm')
-rw-r--r--source4/auth/ntlm/auth_winbind.c14
-rw-r--r--source4/auth/ntlm/wscript_build2
2 files changed, 8 insertions, 8 deletions
diff --git a/source4/auth/ntlm/auth_winbind.c b/source4/auth/ntlm/auth_winbind.c
index 86526dc64b..0dc52b9169 100644
--- a/source4/auth/ntlm/auth_winbind.c
+++ b/source4/auth/ntlm/auth_winbind.c
@@ -25,7 +25,7 @@
#include "auth/auth.h"
#include "auth/ntlm/auth_proto.h"
#include "auth/auth_sam_reply.h"
-#include "librpc/gen_ndr/ndr_winbind.h"
+#include "librpc/gen_ndr/ndr_winbind_c.h"
#include "lib/messaging/irpc.h"
#include "param/param.h"
#include "nsswitch/libwbclient/wbclient.h"
@@ -134,7 +134,7 @@ static NTSTATUS winbind_check_password(struct auth_method_context *ctx,
struct auth_serversupplied_info **server_info)
{
NTSTATUS status;
- struct server_id *winbind_servers;
+ struct dcerpc_binding_handle *irpc_handle;
struct winbind_check_password_state *s;
const struct auth_usersupplied_info *user_info_new;
struct netr_IdentityInfo *identity_info;
@@ -147,8 +147,10 @@ static NTSTATUS winbind_check_password(struct auth_method_context *ctx,
s = talloc(mem_ctx, struct winbind_check_password_state);
NT_STATUS_HAVE_NO_MEMORY(s);
- winbind_servers = irpc_servers_byname(ctx->auth_ctx->msg_ctx, s, "winbind_server");
- if ((winbind_servers == NULL) || (winbind_servers[0].id == 0)) {
+ irpc_handle = irpc_binding_handle_by_name(s, ctx->auth_ctx->msg_ctx,
+ "winbind_server",
+ &ndr_table_winbind);
+ if (irpc_handle == NULL) {
DEBUG(0, ("Winbind authentication for [%s]\\[%s] failed, "
"no winbind_server running!\n",
user_info->client.domain_name, user_info->client.account_name));
@@ -209,9 +211,7 @@ static NTSTATUS winbind_check_password(struct auth_method_context *ctx,
s->req.in.validation_level = 3;
- status = IRPC_CALL(ctx->auth_ctx->msg_ctx, winbind_servers[0],
- winbind, WINBIND_SAMLOGON,
- &s->req, s);
+ status = dcerpc_winbind_SamLogon_r(irpc_handle, s, &s->req);
NT_STATUS_NOT_OK_RETURN(status);
status = make_server_info_netlogon_validation(mem_ctx,
diff --git a/source4/auth/ntlm/wscript_build b/source4/auth/ntlm/wscript_build
index 6368d2d1ca..c3ce364077 100644
--- a/source4/auth/ntlm/wscript_build
+++ b/source4/auth/ntlm/wscript_build
@@ -27,7 +27,7 @@ bld.SAMBA_MODULE('auth_winbind',
source='auth_winbind.c',
subsystem='auth',
init_function='auth_winbind_init',
- deps='NDR_WINBIND MESSAGING LIBWBCLIENT'
+ deps='RPC_NDR_WINBIND MESSAGING LIBWBCLIENT'
)