From f4c59d07d5d639856887e6aec624d608e8024cf7 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Mon, 25 Apr 2016 08:08:35 +0200 Subject: telnetd: Fix warnings --- cpukit/telnetd/check_passwd.c | 3 +-- cpukit/telnetd/des.c | 12 +++--------- cpukit/telnetd/des.h | 1 + cpukit/telnetd/pty.c | 1 + cpukit/telnetd/pty.h | 8 ++++++++ 5 files changed, 14 insertions(+), 11 deletions(-) create mode 100644 cpukit/telnetd/des.h 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 +#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 #include +#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 #include #include +#include #include #include /*-----------------------------------------*/ 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 -- cgit v1.2.3