summaryrefslogtreecommitdiff
path: root/source3/client
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2011-07-22 14:11:34 +0200
committerMichael Adam <obnox@samba.org>2011-07-22 15:42:17 +0200
commit7327bde81acecf4ae0c09f80cebe21a1312aeb3a (patch)
treec6a45f69c17dcbae69c05acb193824b82735440f /source3/client
parent88d0e44df340e5954b2f57c779c2a49a5fac0b11 (diff)
downloadsamba-7327bde81acecf4ae0c09f80cebe21a1312aeb3a.tar.gz
samba-7327bde81acecf4ae0c09f80cebe21a1312aeb3a.tar.bz2
samba-7327bde81acecf4ae0c09f80cebe21a1312aeb3a.zip
s3:smbclient: add a "tdis" command to do a tree disconnect (close a connection to a share)
Diffstat (limited to 'source3/client')
-rw-r--r--source3/client/client.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/source3/client/client.c b/source3/client/client.c
index e3a7204118..3dbc4ebf81 100644
--- a/source3/client/client.c
+++ b/source3/client/client.c
@@ -4359,6 +4359,24 @@ static int cmd_tcon(void)
return 0;
}
+/**
+ * tree disconnect (disconnect from a share)
+ */
+
+static int cmd_tdis(void)
+{
+ NTSTATUS status;
+
+ status = cli_tdis(cli);
+ if (!NT_STATUS_IS_OK(status)) {
+ d_printf("tdis failed: %s\n", nt_errstr(status));
+ return -1;
+ }
+
+ d_printf("tdis successful\n");
+ return 0;
+}
+
/****************************************************************************
list active connections
@@ -4549,6 +4567,7 @@ static struct {
{"listconnect",cmd_list_connect,"list open connections",{COMPL_NONE,COMPL_NONE}},
{"showconnect",cmd_show_connect,"display the current active connection",{COMPL_NONE,COMPL_NONE}},
{"tcon",cmd_tcon,"connect to a share" ,{COMPL_NONE,COMPL_NONE}},
+ {"tdis",cmd_tdis,"disconnect from a share",{COMPL_NONE,COMPL_NONE}},
{"logoff",cmd_logoff,"log off (close the session)",{COMPL_NONE,COMPL_NONE}},
{"..",cmd_cd_oneup,"change the remote directory (up one level)",{COMPL_REMOTE,COMPL_NONE}},