summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2016-04-25 08:08:35 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2016-04-25 08:10:18 +0200
commitf4c59d07d5d639856887e6aec624d608e8024cf7 (patch)
tree245e553ca6fb8c123a69176db60600fc4f26d7ea
parentpppd: Fix warnings (diff)
downloadrtems-f4c59d07d5d639856887e6aec624d608e8024cf7.tar.bz2
telnetd: Fix warnings
-rw-r--r--cpukit/telnetd/check_passwd.c3
-rw-r--r--cpukit/telnetd/des.c12
-rw-r--r--cpukit/telnetd/des.h1
-rw-r--r--cpukit/telnetd/pty.c1
-rw-r--r--cpukit/telnetd/pty.h8
5 files changed, 14 insertions, 11 deletions
diff --git a/cpukit/telnetd/check_passwd.c b/cpukit/telnetd/check_passwd.c
index 9e3f2c983b..aae1c89b5d 100644
--- a/cpukit/telnetd/check_passwd.c
+++ b/cpukit/telnetd/check_passwd.c
@@ -69,10 +69,9 @@
#include <rtems/telnetd.h>
+#include "des.h"
#include "passwd.h"
-char *__des_crypt_r( const char *, const char *, char *, int);
-
/**
* @brief Standard Telnet login check that uses DES to encrypt the passphrase.
*
diff --git a/cpukit/telnetd/des.c b/cpukit/telnetd/des.c
index 542e89681d..1d0295a644 100644
--- a/cpukit/telnetd/des.c
+++ b/cpukit/telnetd/des.c
@@ -74,6 +74,8 @@
#include <string.h>
#include <stdlib.h>
+#include "des.h"
+
#define REENTRANT
/* Re-entrantify me -- all this junk needs to be in
* struct crypt_data to make this really reentrant... */
@@ -263,7 +265,7 @@ ascii_to_bin(char ch)
return(0);
}
-struct Des_Context *
+static struct Des_Context *
des_ctx_init(void)
{
struct Des_Context *des_ctx;
@@ -834,14 +836,6 @@ bailout:
return rval;
}
-char *
-__des_crypt(const char *key, const char *setting)
-{
- static char output[21];
- return __des_crypt_r(key, setting, output, sizeof(output));
-}
-
-
#ifdef DEBUG
void
diff --git a/cpukit/telnetd/des.h b/cpukit/telnetd/des.h
new file mode 100644
index 0000000000..382dab7a8d
--- /dev/null
+++ b/cpukit/telnetd/des.h
@@ -0,0 +1 @@
+char *__des_crypt_r(const char *, const char *, char *, int);
diff --git a/cpukit/telnetd/pty.c b/cpukit/telnetd/pty.c
index 30bfe98951..d41de97d85 100644
--- a/cpukit/telnetd/pty.c
+++ b/cpukit/telnetd/pty.c
@@ -35,6 +35,7 @@
#include <rtems.h>
#include <rtems/libio.h>
#include <rtems/bspIo.h>
+#include <rtems/pty.h>
#include <errno.h>
#include <sys/socket.h>
/*-----------------------------------------*/
diff --git a/cpukit/telnetd/pty.h b/cpukit/telnetd/pty.h
index 1d86294c44..392bfd0969 100644
--- a/cpukit/telnetd/pty.h
+++ b/cpukit/telnetd/pty.h
@@ -61,6 +61,14 @@ rtems_device_driver pty_control(
{ pty_initialize , pty_open , pty_close , \
pty_read , pty_write , pty_control }
+/* Internal functions */
+
+int telnet_pty_initialize(void);
+
+int telnet_pty_finalize(void);
+
+char *telnet_get_pty(int);
+
#ifdef __cplusplus
}
#endif