aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--daemon.c9
-rw-r--r--socket.c8
-rw-r--r--socket.h4
3 files changed, 15 insertions, 6 deletions
diff --git a/daemon.c b/daemon.c
index db6ee78b..64b1c90d 100644
--- a/daemon.c
+++ b/daemon.c
@@ -210,9 +210,14 @@ flag isafile(int fd)
{
struct stat stbuf;
- if (fstat(fd, &stbuf))
+ /*
+ * We'd like just to return 1 on (S_IFREG | S_IFBLK),
+ * but weirdly enough, Linux ptys seem to have S_IFBLK
+ * so this test would fail when run on an xterm.
+ */
+ if (isatty(fd) || fstat(fd, &stbuf))
return(0);
- else if (stbuf.st_mode & (S_IFREG | S_IFBLK))
+ else if (stbuf.st_mode & (S_IFREG))
return(1);
return(0);
}
diff --git a/socket.c b/socket.c
index 89de862a..1d9dbef8 100644
--- a/socket.c
+++ b/socket.c
@@ -344,10 +344,10 @@ va_dcl {
}
#ifdef SSL_ENABLE
-#include "ssl.h"
-#include "err.h"
-#include "pem.h"
-#include "x509.h"
+#include "openssl/ssl.h"
+#include "openssl/err.h"
+#include "openssl/pem.h"
+#include "openssl/x509.h"
static SSL_CTX *_ctx = NULL;
static SSL *_ssl_context[FD_SETSIZE];
diff --git a/socket.h b/socket.h
index dcd0ed7a..0c6d3eaa 100644
--- a/socket.h
+++ b/socket.h
@@ -58,4 +58,8 @@ additional clean-up if necessary.
*/
int SockClose(int sock);
+#if SSL_ENABLE
+int SSLOpen(int sock, char *mycert, char *mykey, char *servercname);
+#endif /* SSL_ENABLE */
+
#endif /* SOCKET__ */