projects
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Update copyright year
[openssl.git]
/
crypto
/
ui
/
ui_openssl.c
diff --git
a/crypto/ui/ui_openssl.c
b/crypto/ui/ui_openssl.c
index 04d4f6e4462bf2e930447bdacf6ff9018f0783ed..78b88c07f1078e114421fa25fa4019d862ded399 100644
(file)
--- a/
crypto/ui/ui_openssl.c
+++ b/
crypto/ui/ui_openssl.c
@@
-1,5
+1,5
@@
/*
/*
- * Copyright 2001-20
18
The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 2001-20
20
The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the Apache License 2.0 (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
*
* Licensed under the Apache License 2.0 (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
@@
-34,11
+34,7
@@
# include <errno.h>
# if !defined(OPENSSL_SYS_MSDOS) && !defined(OPENSSL_SYS_VMS)
# include <errno.h>
# if !defined(OPENSSL_SYS_MSDOS) && !defined(OPENSSL_SYS_VMS)
-# ifdef OPENSSL_UNISTD
-# include OPENSSL_UNISTD
-# else
-# include <unistd.h>
-# endif
+# include <unistd.h>
/*
* If unistd.h defines _POSIX_VERSION, we conclude that we are on a POSIX
* system and have sigaction and termios.
/*
* If unistd.h defines _POSIX_VERSION, we conclude that we are on a POSIX
* system and have sigaction and termios.
@@
-53,7
+49,7
@@
# endif
# endif
# endif
# endif
-# include "ui_locl.h"
+# include "ui_loc
a
l.h"
# include "internal/cryptlib.h"
# ifdef OPENSSL_SYS_VMS /* prototypes for sys$whatever */
# include "internal/cryptlib.h"
# ifdef OPENSSL_SYS_VMS /* prototypes for sys$whatever */
@@
-79,7
+75,7
@@
* systems that require something different.
*
* Note: we do not use SGTTY unless it's defined by the configuration. We
* systems that require something different.
*
* Note: we do not use SGTTY unless it's defined by the configuration. We
- * may eventually opt to remove it
'
s use entirely.
+ * may eventually opt to remove its use entirely.
*/
# if !defined(TERMIOS) && !defined(TERMIO) && !defined(SGTTY)
*/
# if !defined(TERMIOS) && !defined(TERMIO) && !defined(SGTTY)
@@
-92,8
+88,8
@@
* We know that VMS, MSDOS, VXWORKS, use entirely other mechanisms.
*/
# elif !defined(OPENSSL_SYS_VMS) \
* We know that VMS, MSDOS, VXWORKS, use entirely other mechanisms.
*/
# elif !defined(OPENSSL_SYS_VMS) \
- && !defined(OPENSSL_SYS_MSDOS) \
- && !defined(OPENSSL_SYS_VXWORKS)
+
&& !defined(OPENSSL_SYS_MSDOS) \
+
&& !defined(OPENSSL_SYS_VXWORKS)
# define TERMIOS
# undef TERMIO
# undef SGTTY
# define TERMIOS
# undef TERMIO
# undef SGTTY
@@
-439,6
+435,16
@@
static int open_console(UI *ui)
is_a_tty = 0;
else
# endif
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),
# ifdef ENODEV
/*
* MacOS X returns ENODEV (Operation not supported by device),