projects
/
oweals
/
openssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5a6fbf6
)
crypto/ui/ui_openssl.c: make sure to recognise ENXIO and EIO too
author
Richard Levitte
<levitte@openssl.org>
Wed, 19 Sep 2018 19:33:45 +0000
(21:33 +0200)
committer
Richard Levitte
<levitte@openssl.org>
Thu, 20 Sep 2018 04:43:56 +0000
(06:43 +0200)
These both indicate that the file descriptor we're trying to use as a
terminal isn't, in fact, a terminal.
Fixes #7271
Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
(Merged from https://github.com/openssl/openssl/pull/7272)
(cherry picked from commit
276bf8620ce35a613c856f2b70348f65ffe94067
)
(cherry picked from commit
ad1730359220cef5903d16c7f58b602fc3713414
)
crypto/ui/ui_openssl.c
patch
|
blob
|
history
diff --git
a/crypto/ui/ui_openssl.c
b/crypto/ui/ui_openssl.c
index 1ad0cfc5b873e52f702adb8d60251f9e31a50bf5..4b4eb81a5e6615af89062f296e436187eedce6b1 100644
(file)
--- a/
crypto/ui/ui_openssl.c
+++ b/
crypto/ui/ui_openssl.c
@@
-509,6
+509,24
@@
static int open_console(UI *ui)
is_a_tty = 0;
else
# endif
+# ifdef ENXIO
+ /*
+ * Solaris can return ENXIO.
+ * This should be ok
+ */
+ if (errno == ENXIO)
+ is_a_tty = 0;
+ else
+# endif
+# ifdef EIO
+ /*
+ * Linux can return EIO.
+ * This should be ok
+ */
+ if (errno == EIO)
+ is_a_tty = 0;
+ else
+# endif
# ifdef ENODEV
/*
* MacOS X returns ENODEV (Operation not supported by device),