diff options
author | Volker Lendecke <vlendec@samba.org> | 2005-01-06 15:35:02 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 10:53:47 -0500 |
commit | c85d9e735c8294088203f1656ae07a4b0835292c (patch) | |
tree | b425600689792bcee9fe21e46f2aa8dfdb0eb291 /source3/libsmb | |
parent | f4ec52a0978dca900942e6001947e3b3d58eccd2 (diff) | |
download | samba-c85d9e735c8294088203f1656ae07a4b0835292c.tar.gz samba-c85d9e735c8294088203f1656ae07a4b0835292c.tar.bz2 samba-c85d9e735c8294088203f1656ae07a4b0835292c.zip |
r4570: Replace cli->nt_pipe_fnum with an array of NT file numbers, one for each
supported pipe. Netlogon is still special, as we open that twice, one to do
the auth2, the other one with schannel.
The client interface is completely unchanged for those who only use a single
pie. cli->pipe_idx is used as the index for everything except the "real"
client rpc calls, which have been explicitly converted in my last commit. Next
step is to get winbind to just use a single smb connection for multiple pipes.
Volker
(This used to be commit dc294c52e0216424236057ca6cd35e1ebf51d0da)
Diffstat (limited to 'source3/libsmb')
-rw-r--r-- | source3/libsmb/clientgen.c | 16 | ||||
-rw-r--r-- | source3/libsmb/clitrans.c | 4 |
2 files changed, 13 insertions, 7 deletions
diff --git a/source3/libsmb/clientgen.c b/source3/libsmb/clientgen.c index 682e0d8b85..39fe91172d 100644 --- a/source3/libsmb/clientgen.c +++ b/source3/libsmb/clientgen.c @@ -245,6 +245,7 @@ void cli_setup_signing_state(struct cli_state *cli, int signing_state) struct cli_state *cli_initialise(struct cli_state *cli) { BOOL alloced_cli = False; + int i; /* Check the effective uid - make sure we are not setuid */ if (is_setuid_root()) { @@ -315,7 +316,9 @@ struct cli_state *cli_initialise(struct cli_state *cli) /* initialise signing */ cli_null_set_signing(cli); - cli->nt_pipe_fnum = 0; + for (i=0; i<PI_MAX_PIPES; i++) + cli->nt_pipe_fnum[i] = 0; + cli->saved_netlogon_pipe_fnum = 0; cli->initialised = 1; @@ -344,14 +347,17 @@ close the session void cli_nt_session_close(struct cli_state *cli) { + int i; + if (cli->ntlmssp_pipe_state) { ntlmssp_end(&cli->ntlmssp_pipe_state); } - if (cli->nt_pipe_fnum != 0) - cli_close(cli, cli->nt_pipe_fnum); - - cli->nt_pipe_fnum = 0; + for (i=0; i<PI_MAX_PIPES; i++) { + if (cli->nt_pipe_fnum[i] != 0) + cli_close(cli, cli->nt_pipe_fnum[i]); + cli->nt_pipe_fnum[i] = 0; + } cli->pipe_idx = -1; } diff --git a/source3/libsmb/clitrans.c b/source3/libsmb/clitrans.c index 761741a91b..3f1afa75d6 100644 --- a/source3/libsmb/clitrans.c +++ b/source3/libsmb/clitrans.c @@ -504,7 +504,7 @@ BOOL cli_receive_nt_trans(struct cli_state *cli, */ if (cli_is_dos_error(cli)) { cli_dos_error(cli, &eclass, &ecode); - if (cli->nt_pipe_fnum == 0 || !(eclass == ERRDOS && ecode == ERRmoredata)) { + if (cli->nt_pipe_fnum[cli->pipe_idx] == 0 || !(eclass == ERRDOS && ecode == ERRmoredata)) { cli_signing_trans_stop(cli); return(False); } @@ -638,7 +638,7 @@ BOOL cli_receive_nt_trans(struct cli_state *cli, } if (cli_is_dos_error(cli)) { cli_dos_error(cli, &eclass, &ecode); - if(cli->nt_pipe_fnum == 0 || !(eclass == ERRDOS && ecode == ERRmoredata)) { + if(cli->nt_pipe_fnum[cli->pipe_idx] == 0 || !(eclass == ERRDOS && ecode == ERRmoredata)) { cli_signing_trans_stop(cli); return(False); } |