diff options
author | Matt Johnston <matt@ucc.asn.au> | 2005-02-28 13:01:00 +0000 |
---|---|---|
committer | Matt Johnston <matt@ucc.asn.au> | 2005-02-28 13:01:00 +0000 |
commit | 346ff0b9378d1f0e105068ae016385029d4e4067 (patch) | |
tree | 73c33dc1b96bca5d3826f691cdd8efcf901e39e4 /dbutil.c | |
parent | adcf896f024398dfe98a2500572d7b32d4f43954 (diff) | |
download | dropbear-346ff0b9378d1f0e105068ae016385029d4e4067.tar.gz |
* add SSH_ASKPASS support (based on patch from Paul Whittaker
* don't exit if setnonblocking() fails with "not supported by device"
(allows redirection from /dev/null)
Diffstat (limited to 'dbutil.c')
-rw-r--r-- | dbutil.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -627,7 +627,13 @@ void setnonblocking(int fd) { TRACE(("setnonblocking: %d", fd)) if (fcntl(fd, F_SETFL, O_NONBLOCK) < 0) { - dropbear_exit("Couldn't set nonblocking"); + if (errno == ENODEV) { + /* Some devices (like /dev/null redirected in) + * can't be set to non-blocking */ + TRACE(("ignoring ENODEV for setnonblocking")) + } else { + dropbear_exit("Couldn't set nonblocking"); + } } TRACE(("leave setnonblocking")) } |