diff options
author | Luke Leighton <lkcl@samba.org> | 1997-10-30 22:21:49 +0000 |
---|---|---|
committer | Luke Leighton <lkcl@samba.org> | 1997-10-30 22:21:49 +0000 |
commit | 9fc5056a4a2f08ce94992cbf2b15f99ce59f7a2d (patch) | |
tree | 9f1aee90babd25e13d373e42738db6bc8db5d94f | |
parent | 55e2dc7c6f4378adfdcbd166b2680096a3e4a5a4 (diff) | |
download | samba-9fc5056a4a2f08ce94992cbf2b15f99ce59f7a2d.tar.gz samba-9fc5056a4a2f08ce94992cbf2b15f99ce59f7a2d.tar.bz2 samba-9fc5056a4a2f08ce94992cbf2b15f99ce59f7a2d.zip |
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)
-rw-r--r-- | source3/client/ntclient.c | 22 |
1 files changed, 18 insertions, 4 deletions
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; |