diff options
-rw-r--r-- | source3/client/client.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/source3/client/client.c b/source3/client/client.c index 1cf44103e9..a5bee39f0a 100644 --- a/source3/client/client.c +++ b/source3/client/client.c @@ -4308,6 +4308,24 @@ static int cmd_logon(void) return 0; } +/** + * close the session + */ + +static int cmd_logoff(void) +{ + NTSTATUS status; + + status = cli_ulogoff(cli); + if (!NT_STATUS_IS_OK(status)) { + d_printf("logoff failed: %s\n", nt_errstr(status)); + return -1; + } + + d_printf("logoff successful\n"); + return 0; +} + /**************************************************************************** list active connections @@ -4497,6 +4515,7 @@ static struct { {"logon",cmd_logon,"establish new logon",{COMPL_NONE,COMPL_NONE}}, {"listconnect",cmd_list_connect,"list open connections",{COMPL_NONE,COMPL_NONE}}, {"showconnect",cmd_show_connect,"display the current active connection",{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}}, /* Yes, this must be here, see crh's comment above. */ |