提交 08239483 编写于 作者: M Maxim Zakharov 提交者: Matt Caswell

TTY_get() in crypto/ui/ui_openssl.c open_console() can also return errno 1 (EPERM, Linux)

Signed-off-by: NMaxim Zakharov <5158255+Maxime2@users.noreply.github.com>
Reviewed-by: NTomas Mraz <tmraz@fedoraproject.org>
Reviewed-by: NMatt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/11767)
上级 88b15ed9
......@@ -435,6 +435,16 @@ static int open_console(UI *ui)
is_a_tty = 0;
else
# endif
# ifdef EPERM
/*
* Linux can return EPERM (Operation not permitted),
* e.g. if a daemon executes openssl via fork()+execve()
* This should be ok
*/
if (errno == EPERM)
is_a_tty = 0;
else
# endif
# ifdef ENODEV
/*
* MacOS X returns ENODEV (Operation not supported by device),
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册