aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssh/src/ssh_no_io.erl
diff options
context:
space:
mode:
authorIngela Anderton Andin <[email protected]>2013-11-14 10:33:11 +0100
committerIngela Anderton Andin <[email protected]>2013-11-14 10:33:11 +0100
commit19aedb5c0cb956e51b24fbba4923520efe7bf54b (patch)
tree5f38b856389ccfb43c83b7be5e33529b699e6574 /lib/ssh/src/ssh_no_io.erl
parentc46240c78fbce1b8b026f975d80b397209ac4968 (diff)
parent7efe1b6dd3215261777b5f335b4f92dfca7cea42 (diff)
downloadotp-19aedb5c0cb956e51b24fbba4923520efe7bf54b.tar.gz
otp-19aedb5c0cb956e51b24fbba4923520efe7bf54b.tar.bz2
otp-19aedb5c0cb956e51b24fbba4923520efe7bf54b.zip
Merge branch 'ia/ssh/one-connection-process/OTP-11363' into maint
* ia/ssh/one-connection-process/OTP-11363: ssh: Logging fun and document enhancement ssh: Add CLI test case ssh: Quicker shutdown of an ssh dameon ssh: Add option to disallow CLI ssh: Simplify handling of connection attributes (e.i. user and sockname) ssh: Make inet option configurable and remove ipv6_disabled option ssh: Eliminate test case failure due to timing issues in test case code ssh: Enhance error handling ssh: Merge connection_manager and connection_handler processes ssh: Remove use of process dictionary
Diffstat (limited to 'lib/ssh/src/ssh_no_io.erl')
-rw-r--r--lib/ssh/src/ssh_no_io.erl23
1 files changed, 18 insertions, 5 deletions
diff --git a/lib/ssh/src/ssh_no_io.erl b/lib/ssh/src/ssh_no_io.erl
index 2c8dd92ee2..9f83506cdd 100644
--- a/lib/ssh/src/ssh_no_io.erl
+++ b/lib/ssh/src/ssh_no_io.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2005-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2005-2013. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -22,18 +22,31 @@
%%% Description: ssh_io replacement that throws on everything
-module(ssh_no_io).
+-include("ssh_transport.hrl").
-export([yes_no/1, read_password/1, read_line/1, format/2]).
yes_no(_Prompt) ->
- throw({no_io_allowed, yes_no}).
+ throw({{no_io_allowed, yes_no},
+ #ssh_msg_disconnect{code = ?SSH_DISCONNECT_SERVICE_NOT_AVAILABLE,
+ description = "User interaction is not allowed",
+ language = "en"}}).
read_password(_Prompt) ->
- throw({no_io_allowed, read_password}).
+ throw({{no_io_allowed, read_password},
+ #ssh_msg_disconnect{code = ?SSH_DISCONNECT_SERVICE_NOT_AVAILABLE,
+ description = "User interaction is not allowed",
+ language = "en"}}).
read_line(_Prompt) ->
- throw({no_io_allowed, read_line}).
+ throw({{no_io_allowed, read_line},
+ #ssh_msg_disconnect{code = ?SSH_DISCONNECT_SERVICE_NOT_AVAILABLE,
+ description = "User interaction is not allowed",
+ language = "en"}} ).
format(_Fmt, _Args) ->
- throw({no_io_allowed, format}).
+ throw({{no_io_allowed, format},
+ #ssh_msg_disconnect{code = ?SSH_DISCONNECT_SERVICE_NOT_AVAILABLE,
+ description = "User interaction is not allowed",
+ language = "en"}}).