summaryrefslogtreecommitdiff
path: root/dbutil.c
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2005-02-28 13:01:00 +0000
committerMatt Johnston <matt@ucc.asn.au>2005-02-28 13:01:00 +0000
commit346ff0b9378d1f0e105068ae016385029d4e4067 (patch)
tree73c33dc1b96bca5d3826f691cdd8efcf901e39e4 /dbutil.c
parentadcf896f024398dfe98a2500572d7b32d4f43954 (diff)
downloaddropbear-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.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/dbutil.c b/dbutil.c
index fbe170d..5f3a45d 100644
--- a/dbutil.c
+++ b/dbutil.c
@@ -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"))
}