2 Unix SMB/Netbios implementation.
4 NT Domain Authentication SMB / MSRPC client
5 Copyright (C) Andrew Tridgell 1994-2000
6 Copyright (C) Luke Kenneth Casson Leighton 1996-2000
7 Copyright (C) Tim Potter 2001
9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 2 of the License, or
12 (at your option) any later version.
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
19 You should have received a copy of the GNU General Public License
20 along with this program; if not, write to the Free Software
21 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
26 /* Opens a SMB connection to the svrsvc pipe */
28 struct cli_state *cli_svrsvc_initialise(struct cli_state *cli,
30 struct ntuser_creds *creds)
32 return cli_pipe_initialise(cli, system_name, PIPE_SRVSVC, creds);
35 NTSTATUS cli_srvsvc_net_srv_get_info(struct cli_state *cli,
37 uint32 switch_value, SRV_INFO_CTR *ctr)
39 prs_struct qbuf, rbuf;
40 SRV_Q_NET_SRV_GET_INFO q;
41 SRV_R_NET_SRV_GET_INFO r;
47 /* Initialise parse structures */
49 prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL);
50 prs_init(&rbuf, 0, mem_ctx, UNMARSHALL);
52 /* Initialise input parameters */
54 init_srv_q_net_srv_get_info(&q, cli->srv_name_slash, switch_value);
56 /* Marshall data and send request */
58 if (!srv_io_q_net_srv_get_info("", &q, &qbuf, 0) ||
59 !rpc_api_pipe_req(cli, SRV_NET_SRV_GET_INFO, &qbuf, &rbuf)) {
60 result = NT_STATUS_UNSUCCESSFUL;
64 /* Unmarshall response */
68 if (!srv_io_r_net_srv_get_info("", &r, &rbuf, 0)) {
69 result = NT_STATUS_UNSUCCESSFUL;