summaryrefslogtreecommitdiff
path: root/source3/rpcclient
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-03-09 20:04:35 +0100
committerGünther Deschner <gd@samba.org>2008-03-10 03:43:39 +0100
commit64adc15e66b0c98dca827550e432f319ef709b5a (patch)
tree272f935703279353ff4332bb000c1306e814bff7 /source3/rpcclient
parentca354276ca491a413c8dfc30e9c093e71dc2e9d3 (diff)
downloadsamba-64adc15e66b0c98dca827550e432f319ef709b5a.tar.gz
samba-64adc15e66b0c98dca827550e432f319ef709b5a.tar.bz2
samba-64adc15e66b0c98dca827550e432f319ef709b5a.zip
Add netsessdel command to rpcclient.
Guenther (This used to be commit 5e112ff3d7984c278949833a00349a9f523d4b23)
Diffstat (limited to 'source3/rpcclient')
-rw-r--r--source3/rpcclient/cmd_srvsvc.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/source3/rpcclient/cmd_srvsvc.c b/source3/rpcclient/cmd_srvsvc.c
index 25a33baa27..351b0cb5c0 100644
--- a/source3/rpcclient/cmd_srvsvc.c
+++ b/source3/rpcclient/cmd_srvsvc.c
@@ -635,6 +635,33 @@ static WERROR cmd_srvsvc_net_file_get_sec(struct rpc_pipe_client *cli,
return result;
}
+static WERROR cmd_srvsvc_net_sess_del(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ int argc, const char **argv)
+{
+ WERROR result;
+ NTSTATUS status;
+
+ if (argc < 2 || argc > 4) {
+ printf("Usage: %s [client] [user]\n", argv[0]);
+ return WERR_OK;
+ }
+
+ status = rpccli_srvsvc_NetSessDel(cli, mem_ctx,
+ cli->cli->desthost,
+ argv[1],
+ argv[2],
+ &result);
+
+ if (!NT_STATUS_IS_OK(status) || !W_ERROR_IS_OK(result)) {
+ goto done;
+ }
+
+ done:
+ return result;
+}
+
+
/* List of commands exported by this module */
struct cmd_set srvsvc_commands[] = {
@@ -650,6 +677,7 @@ struct cmd_set srvsvc_commands[] = {
{ "netremotetod",RPC_RTYPE_WERROR, NULL, cmd_srvsvc_net_remote_tod, PI_SRVSVC, NULL, "Fetch remote time of day", "" },
{ "netnamevalidate", RPC_RTYPE_WERROR, NULL, cmd_srvsvc_net_name_validate, PI_SRVSVC, NULL, "Validate sharename", "" },
{ "netfilegetsec", RPC_RTYPE_WERROR, NULL, cmd_srvsvc_net_file_get_sec, PI_SRVSVC, NULL, "Get File security", "" },
+ { "netsessdel", RPC_RTYPE_WERROR, NULL, cmd_srvsvc_net_sess_del, PI_SRVSVC, NULL, "Delete Session", "" },
{ NULL }
};