summaryrefslogtreecommitdiffstats
path: root/source/rpc_client
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2005-06-13 13:16:55 +0000
committerGünther Deschner <gd@samba.org>2005-06-13 13:16:55 +0000
commit213f4186b1dda4cc873cb8663dbbd25bc17089a2 (patch)
tree3539a4921085f67b84d1b37e3aa086f11a885b52 /source/rpc_client
parent4dfba4d04c457b6d1931565e13360de24290fcc2 (diff)
downloadsamba-213f4186b1dda4cc873cb8663dbbd25bc17089a2.tar.gz
samba-213f4186b1dda4cc873cb8663dbbd25bc17089a2.tar.xz
samba-213f4186b1dda4cc873cb8663dbbd25bc17089a2.zip
r7534: Add missing cli_srvsvc_net_share_set_info-function and
rpcclient-testers. Needed in preparation of share-ACL migration in net. Guenther
Diffstat (limited to 'source/rpc_client')
-rw-r--r--source/rpc_client/cli_srvsvc.c50
1 files changed, 50 insertions, 0 deletions
diff --git a/source/rpc_client/cli_srvsvc.c b/source/rpc_client/cli_srvsvc.c
index dd12367e032..a8a6bc1ff65 100644
--- a/source/rpc_client/cli_srvsvc.c
+++ b/source/rpc_client/cli_srvsvc.c
@@ -301,6 +301,9 @@ WERROR cli_srvsvc_net_share_get_info(struct cli_state *cli,
info502_str->sd = dup_sec_desc(mem_ctx, info502_str->sd);
break;
}
+ default:
+ DEBUG(0,("unimplemented info-level: %d\n", info_level));
+ break;
}
done:
@@ -310,6 +313,53 @@ WERROR cli_srvsvc_net_share_get_info(struct cli_state *cli,
return result;
}
+WERROR cli_srvsvc_net_share_set_info(struct cli_state *cli,
+ TALLOC_CTX *mem_ctx,
+ const char *sharename,
+ uint32 info_level,
+ SRV_SHARE_INFO *info)
+{
+ prs_struct qbuf, rbuf;
+ SRV_Q_NET_SHARE_SET_INFO q;
+ SRV_R_NET_SHARE_SET_INFO r;
+ WERROR result = W_ERROR(ERRgeneral);
+
+ ZERO_STRUCT(q);
+ ZERO_STRUCT(r);
+
+ /* Initialise parse structures */
+
+ prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL);
+ prs_init(&rbuf, 0, mem_ctx, UNMARSHALL);
+
+ /* Initialise input parameters */
+
+ init_srv_q_net_share_set_info(&q, cli->srv_name_slash, sharename,
+ info_level, info);
+
+ /* Marshall data and send request */
+
+ if (!srv_io_q_net_share_set_info("", &q, &qbuf, 0) ||
+ !rpc_api_pipe_req(cli, PI_SRVSVC, SRV_NET_SHARE_SET_INFO, &qbuf, &rbuf))
+ goto done;
+
+ /* Unmarshall response */
+
+ if (!srv_io_r_net_share_set_info("", &r, &rbuf, 0))
+ goto done;
+
+ result = r.status;
+
+ if (!W_ERROR_IS_OK(result))
+ goto done;
+
+ done:
+ prs_mem_free(&qbuf);
+ prs_mem_free(&rbuf);
+
+ return result;
+}
+
WERROR cli_srvsvc_net_share_del(struct cli_state *cli, TALLOC_CTX *mem_ctx,
const char *sharename)
{