From 9fc5056a4a2f08ce94992cbf2b15f99ce59f7a2d Mon Sep 17 00:00:00 2001 From: Luke Leighton Date: Thu, 30 Oct 1997 22:21:49 +0000 Subject: added a client-side "set named pipe handle state" function. not known exactly when you call this (before or after a bind). can sort that out later. (This used to be commit a64ba16db615f83739c147a521ccff3f7c42987b) --- source3/client/ntclient.c | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) (limited to 'source3/client') diff --git a/source3/client/ntclient.c b/source3/client/ntclient.c index 38d96f440c..65d9da9d5f 100644 --- a/source3/client/ntclient.c +++ b/source3/client/ntclient.c @@ -100,7 +100,7 @@ BOOL do_nt_login(char *desthost, char *myhostname, /******************* open the \PIPE\lsarpc file *****************/ - if ((fnum = open_rpc_pipe(inbuf, outbuf, PIPE_LSARPC, Client, cnum)) == 0xffff) + if ((fnum = rpc_pipe_open(inbuf, outbuf, PIPE_LSARPC, Client, cnum)) == 0xffff) { free(inbuf); free(outbuf); return False; @@ -126,7 +126,14 @@ BOOL do_nt_login(char *desthost, char *myhostname, make_rpc_iface(&abstract, abs_data, 0x0); make_rpc_iface(&transfer, trn_data, 0x2); - if (!bind_rpc_pipe(PIPE_LSARPC, fnum, ++call_id, &abstract, &transfer)) + if (!rpc_pipe_bind(PIPE_LSARPC, fnum, ++call_id, &abstract, &transfer)) + { + free(inbuf); free(outbuf); + return False; + } + + /**************** Set Named Pipe State ***************/ + if (!rpc_pipe_set_hnd_state(PIPE_LSARPC, fnum, 0x4300)) { free(inbuf); free(outbuf); return False; @@ -185,7 +192,7 @@ BOOL do_nt_login(char *desthost, char *myhostname, /******************* open the \PIPE\NETLOGON file *****************/ - if ((fnum = open_rpc_pipe(inbuf, outbuf, PIPE_NETLOGON, Client, cnum)) == 0xffff) + if ((fnum = rpc_pipe_open(inbuf, outbuf, PIPE_NETLOGON, Client, cnum)) == 0xffff) { free(inbuf); free(outbuf); return False; @@ -193,7 +200,14 @@ BOOL do_nt_login(char *desthost, char *myhostname, /******************* bind request on \PIPE\NETLOGON *****************/ - if (!bind_rpc_pipe(PIPE_NETLOGON, fnum, ++call_id, &abstract, &transfer)) + if (!rpc_pipe_bind(PIPE_NETLOGON, fnum, ++call_id, &abstract, &transfer)) + { + free(inbuf); free(outbuf); + return False; + } + + /**************** Set Named Pipe State ***************/ + if (!rpc_pipe_set_hnd_state(PIPE_NETLOGON, fnum, 0x4300)) { free(inbuf); free(outbuf); return False; -- cgit