summaryrefslogtreecommitdiff
path: root/source3/rpc_server
diff options
context:
space:
mode:
authorGregor Beck <gbeck@sernet.de>2013-09-13 11:13:15 +0200
committerAndrew Bartlett <abartlet@samba.org>2013-10-17 08:48:49 +1300
commitbd678cdd3b503c013f8384b063b7ba3934b9e4dd (patch)
tree0dc7973b30419513f908b5a9e5a1251f9489af25 /source3/rpc_server
parenta9331e482c0120d70386edb69d924b1c77fa28c7 (diff)
downloadsamba-bd678cdd3b503c013f8384b063b7ba3934b9e4dd.tar.gz
samba-bd678cdd3b503c013f8384b063b7ba3934b9e4dd.tar.bz2
samba-bd678cdd3b503c013f8384b063b7ba3934b9e4dd.zip
s3-spoolss: do not use rpc_pipe_np_smb_conn()
Signed-off-by: Gregor Beck <gbeck@sernet.de> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source3/rpc_server')
-rw-r--r--source3/rpc_server/spoolss/srv_spoolss_nt.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/source3/rpc_server/spoolss/srv_spoolss_nt.c b/source3/rpc_server/spoolss/srv_spoolss_nt.c
index a0cff36b2f..d37c24df6f 100644
--- a/source3/rpc_server/spoolss/srv_spoolss_nt.c
+++ b/source3/rpc_server/spoolss/srv_spoolss_nt.c
@@ -138,6 +138,7 @@ struct notify_back_channel {
/* print notify back-channel pipe handle*/
struct rpc_pipe_client *cli_pipe;
+ struct cli_state *cli;
uint32_t active_connections;
};
@@ -276,7 +277,7 @@ static void srv_spoolss_replycloseprinter(int snum,
/* if it's the last connection, deconnect the IPC$ share */
if (prn_hnd->notify.cli_chan->active_connections == 1) {
- cli_shutdown(rpc_pipe_np_smb_conn(prn_hnd->notify.cli_chan->cli_pipe));
+ cli_shutdown(prn_hnd->notify.cli_chan->cli);
DLIST_REMOVE(back_channels, prn_hnd->notify.cli_chan);
TALLOC_FREE(prn_hnd->notify.cli_chan);
@@ -2440,11 +2441,10 @@ WERROR _spoolss_GetPrinterData(struct pipes_struct *p,
Connect to the client machine.
**********************************************************/
-static bool spoolss_connect_to_client(struct rpc_pipe_client **pp_pipe,
- struct sockaddr_storage *client_ss, const char *remote_machine)
+static bool spoolss_connect_to_client(struct rpc_pipe_client **pp_pipe, struct cli_state **pp_cli,
+ struct sockaddr_storage *client_ss, const char *remote_machine)
{
NTSTATUS ret;
- struct cli_state *the_cli;
struct sockaddr_storage rm_addr;
char addr[INET6_ADDRSTRLEN];
@@ -2470,7 +2470,7 @@ static bool spoolss_connect_to_client(struct rpc_pipe_client **pp_pipe,
}
/* setup the connection */
- ret = cli_full_connection( &the_cli, lp_netbios_name(), remote_machine,
+ ret = cli_full_connection( pp_cli, lp_netbios_name(), remote_machine,
&rm_addr, 0, "IPC$", "IPC",
"", /* username */
"", /* domain */
@@ -2483,9 +2483,9 @@ static bool spoolss_connect_to_client(struct rpc_pipe_client **pp_pipe,
return false;
}
- if ( smbXcli_conn_protocol(the_cli->conn) != PROTOCOL_NT1 ) {
+ if ( smbXcli_conn_protocol((*pp_cli)->conn) != PROTOCOL_NT1 ) {
DEBUG(0,("spoolss_connect_to_client: machine %s didn't negotiate NT protocol.\n", remote_machine));
- cli_shutdown(the_cli);
+ cli_shutdown(*pp_cli);
return false;
}
@@ -2494,11 +2494,11 @@ static bool spoolss_connect_to_client(struct rpc_pipe_client **pp_pipe,
* Now start the NT Domain stuff :-).
*/
- ret = cli_rpc_pipe_open_noauth(the_cli, &ndr_table_spoolss, pp_pipe);
+ ret = cli_rpc_pipe_open_noauth(*pp_cli, &ndr_table_spoolss, pp_pipe);
if (!NT_STATUS_IS_OK(ret)) {
DEBUG(2,("spoolss_connect_to_client: unable to open the spoolss pipe on machine %s. Error was : %s.\n",
remote_machine, nt_errstr(ret)));
- cli_shutdown(the_cli);
+ cli_shutdown(*pp_cli);
return false;
}
@@ -2544,7 +2544,7 @@ static bool srv_spoolss_replyopenprinter(int snum, const char *printer,
}
chan->client_address = *client_ss;
- if (!spoolss_connect_to_client(&chan->cli_pipe, client_ss, unix_printer)) {
+ if (!spoolss_connect_to_client(&chan->cli_pipe, &chan->cli, client_ss, unix_printer)) {
TALLOC_FREE(chan);
return false;
}