commit-inetutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SCM] GNU Inetutils branch, master, updated. inetutils-1_9_1-294-ge9306


From: Mats Erik Andersson
Subject: [SCM] GNU Inetutils branch, master, updated. inetutils-1_9_1-294-ge9306b9
Date: Wed, 22 May 2013 09:00:53 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Inetutils ".

The branch, master has been updated
       via  e9306b9bb186eb8d919ea36a6d8d5e8b3c12c49d (commit)
       via  d485b14c3ba2d0612ef47feff0b99163c7fc0121 (commit)
       via  9ee96c972996b39b42b880d8e3c4c031440e3324 (commit)
       via  a98c1047accf76e0264fe76c4644246524aacc0d (commit)
      from  d987526e82bb5b9757a93cda7f67c33265b54477 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/inetutils.git/commit/?id=e9306b9bb186eb8d919ea36a6d8d5e8b3c12c49d


commit e9306b9bb186eb8d919ea36a6d8d5e8b3c12c49d
Author: Mats Erik Andersson <address@hidden>
Date:   Sat May 18 19:06:03 2013 +0200

    libtelnet: Portability of enctype_names.

diff --git a/ChangeLog b/ChangeLog
index de3fc37..91b8589 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2013-05-18  Mats Erik Andersson  <address@hidden>
+
+       libtelnet: Portability of enctype_names.
+
+       * configure.ac (HAVE_CONST_CHAR_ENCTYPE_NAMES):
+       Check if <arpa/telnet.h> declares enctype_names
+       as `const char []'.
+       * libtelnet/encrypt.c (enctype_names)
+       [HAVE_CONST_CHAR_ENCTYPE_NAMES]: Declare as
+       constant array.
+
 2013-05-17  Mats Erik Andersson  <address@hidden>
 
        libtelnet: Selected compiler warnings.
diff --git a/configure.ac b/configure.ac
index ac09d4b..994b3e8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -827,6 +827,19 @@ AC_CHECK_TYPE(Session_Key,
            [Define to 1 if <arpa/telnet.h> defines a type Session_Key.]), ,
   [#include <arpa/telnet.h>])
 
+# At least NetBSD demands `const char []'.
+AC_MSG_CHECKING([whether enctype_names is const char])
+AC_COMPILE_IFELSE(
+  [AC_LANG_PROGRAM(
+     [[#include <arpa/telnet.h>
+       const char *enctype_names[] = { "ANY", "CFB64", 0 };]],
+     [[ return 0;]])],
+  [AC_DEFINE([HAVE_CONST_CHAR_ENCTYPE_NAMES], 1,
+            [Define to 1 if enctype_names[] must be const char.])
+   ac_iu_const_enctype_names=yes],
+  [ac_iu_const_enctype_names=no])
+AC_MSG_RESULT([$ac_iu_const_enctype_names])
+
 ## Checks for function declarations.
 
 AC_DECL_SYS_SIGLIST
diff --git a/libtelnet/encrypt.c b/libtelnet/encrypt.c
index 29eb37d..41bc631 100644
--- a/libtelnet/encrypt.c
+++ b/libtelnet/encrypt.c
@@ -86,7 +86,12 @@
 /* String representation of our capabilities.
  * Solaris will gain DES_OFB64!
  */
-char *enctype_names[] = {
+# ifdef HAVE_CONST_CHAR_ENCTYPE_NAMES
+const char *enctype_names[] =
+# else
+char *enctype_names[] =
+# endif
+{
   "ANY", "DES_CFB64", "DES_OFB64", 0,
 };
 

http://git.savannah.gnu.org/cgit/inetutils.git/commit/?id=d485b14c3ba2d0612ef47feff0b99163c7fc0121


commit d485b14c3ba2d0612ef47feff0b99163c7fc0121
Author: Mats Erik Andersson <address@hidden>
Date:   Fri May 17 23:51:36 2013 +0200

    libtelnet: Selected compiler warnings.

diff --git a/ChangeLog b/ChangeLog
index 2b000c1..de3fc37 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,38 @@
 2013-05-17  Mats Erik Andersson  <address@hidden>
 
+       libtelnet: Selected compiler warnings.
+
+       * libtelnet/auth.c (auth_send): Cast sizeof() as int.
+       (auth_name): Remove AP.  Make SAVENAME a char array.
+       Cast sizeof() as int.  Rewrite debug message for
+       overflowing name.
+       * libtelnet/enc_des.c (FB64_IV, FB64_IV_OK)
+       (FB64_IV_BAD): Make definitions conditional.
+       (fb64_session): Cast `key->length' as size_t.
+       * libtelnet/encrypt.c (encrypt_is): Do assignment
+       before if-statament.  Use format `%p' with pointer.
+       (encrypt_reply): Likewise.
+       (encrypt_start): Use separate assigment.
+       (encrypt_keyid): Likewise.  Delete STRP and CP.
+       (encrypt_start_output): Use separate assignment.
+       (encrypt_send_request_end): Remove ENCRYPT and DECRYPT.
+
+       * libtelnet/kerberos5.c (kerberos5_is_auth): Make static.
+       (kerberos5_is_forward) [FORWARD]: Likewise.
+       * libtelnet/shishi.c (Data): Third argument is `void *'.
+       Cast as `char *' for strlen().
+       (shishi_init_key) [ENCRYPTION]: Make static.  Cast result
+       from shishi_key_value() as `unsigned char *'.
+       (krb5shishi_reply): shishi_ap_rep_verify_der() needs a cast
+       as `char *'.
+       (krb5shishi_status): Delete RC.
+       (krb5shishi_is_auth): Make static.  Delete KEY2.
+       shishi_ap_req_der_set() needs cast as `char *'.
+
+       * telnet/authenc.c (telnet_getenv): Do not cast `val'.
+
+2013-05-17  Mats Erik Andersson  <address@hidden>
+
        ftp, telnet: Erase passwords after use.
 
        * ftp/cmds.c (user): Erase password string after getpass().
diff --git a/libtelnet/auth.c b/libtelnet/auth.c
index 13fb824..e502b3c 100644
--- a/libtelnet/auth.c
+++ b/libtelnet/auth.c
@@ -470,8 +470,8 @@ auth_send (unsigned char *data, int cnt)
   if (data < _auth_send_data ||
       data > _auth_send_data + sizeof (_auth_send_data))
     {
-      auth_send_cnt = cnt > sizeof (_auth_send_data)
-       ? sizeof (_auth_send_data) : cnt;
+      auth_send_cnt = (cnt > (int) sizeof (_auth_send_data))
+                     ? (int) sizeof (_auth_send_data) : cnt;
       memmove ((void *) _auth_send_data, (void *) data, auth_send_cnt);
       auth_send_data = _auth_send_data;
     }
@@ -605,8 +605,7 @@ auth_reply (unsigned char *data, int cnt)
 void
 auth_name (unsigned char *data, int cnt)
 {
-  TN_Authenticator *ap;
-  unsigned char savename[256];
+  char savename[256];
 
   if (cnt < 1)
     {
@@ -614,10 +613,10 @@ auth_name (unsigned char *data, int cnt)
        printf (">>>%s: Empty name in NAME\r\n", Name);
       return;
     }
-  if (cnt > sizeof (savename) - 1)
+  if (cnt + 1 > (int) sizeof (savename))
     {
       if (auth_debug_mode)
-       printf (">>>%s: Name in NAME (%d) exceeds %d length\r\n",
+       printf (">>>%s: Name in NAME (len %d) overflows buffer (len %zu).\r\n",
                Name, cnt, sizeof (savename) - 1);
       return;
     }
diff --git a/libtelnet/enc_des.c b/libtelnet/enc_des.c
index 2b348a1..3ad0df6 100644
--- a/libtelnet/enc_des.c
+++ b/libtelnet/enc_des.c
@@ -127,9 +127,15 @@ struct keyidlist
 
 #   define SHIFT_VAL(a,b)      (KEYFLAG_SHIFT*((a)+((b)*2)))
 
-#   define FB64_IV     1
-#   define FB64_IV_OK  2
-#   define FB64_IV_BAD 3
+#   ifndef FB64_IV
+#    define FB64_IV    1
+#   endif
+#   ifndef FB64_IV_OK
+#    define FB64_IV_OK 2
+#   endif
+#   ifndef FB64_IV_BAD
+#    define FB64_IV_BAD        3
+#   endif
 
 
 /* Callback from consumer.  */
@@ -482,7 +488,7 @@ fb64_session (Session_Key *key, int server, struct fb *fbp)
   memmove ((void *) derived_key, (void *) key->data, key->length);
 
   /* Check parity of each DES block, correct it whenever needed.  */
-  for (offset = 0; offset < key->length; offset += sizeof (Block))
+  for (offset = 0; offset < (size_t) key->length; offset += sizeof (Block))
     (void) des_set_parity (derived_key + offset);
 
   /* XXX: A single key block is in use for now,
diff --git a/libtelnet/encrypt.c b/libtelnet/encrypt.c
index 5d59b0c..29eb37d 100644
--- a/libtelnet/encrypt.c
+++ b/libtelnet/encrypt.c
@@ -567,7 +567,9 @@ encrypt_is (unsigned char *data, int cnt)
   type = *data++;
   if (type < ENCTYPE_CNT)
     remote_supports_encrypt |= typemask (type);
-  if (!(ep = finddecryption (type)))
+
+  ep = finddecryption (type);
+  if (!ep)
     {
       if (encrypt_debug_mode)
        printf (">>>%s: Can't find type %s (%d) for initial negotiation\r\n",
@@ -589,9 +591,11 @@ encrypt_is (unsigned char *data, int cnt)
     {
       ret = (*ep->is) (data, cnt);
       if (encrypt_debug_mode)
-       printf ("(*ep->is)(%x, %d) returned %s(%d)\n", data, cnt,
-               (ret < 0) ? "FAIL " :
-               (ret == 0) ? "SUCCESS " : "MORE_TO_DO ", ret);
+       printf ("(*ep->is)(%p, %d) returned %s (%d).\r\n",
+               data, cnt,
+               (ret < 0) ? "FAIL "
+                         : ((ret == 0) ? "SUCCESS " : "MORE_TO_DO "),
+               ret);
     }
   if (ret < 0)
     autodecrypt = 0;
@@ -612,7 +616,9 @@ encrypt_reply (unsigned char *data, int cnt)
   if (--cnt < 0)
     return;
   type = *data++;
-  if (!(ep = findencryption (type)))
+
+  ep = findencryption (type);
+  if (!ep)
     {
       if (encrypt_debug_mode)
        printf (">>>%s: Can't find type %s (%d) for initial negotiation\r\n",
@@ -634,10 +640,11 @@ encrypt_reply (unsigned char *data, int cnt)
     {
       ret = (*ep->reply) (data, cnt);
       if (encrypt_debug_mode)
-       printf ("(*ep->reply)(%x, %d) returned %s(%d)\n",
+       printf ("(*ep->reply)(%p, %d) returned %s (%d).\r\n",
                data, cnt,
-               (ret < 0) ? "FAIL " :
-               (ret == 0) ? "SUCCESS " : "MORE_TO_DO ", ret);
+               (ret < 0) ? "FAIL "
+                         : ((ret == 0) ? "SUCCESS " : "MORE_TO_DO "),
+               ret);
     }
   if (encrypt_debug_mode)
     printf (">>>%s: encrypt_reply returned %d\n", Name, ret);
@@ -672,7 +679,8 @@ encrypt_start (unsigned char *data, int cnt)
       return;
     }
 
-  if (ep = finddecryption (decrypt_mode))
+  ep = finddecryption (decrypt_mode);
+  if (ep)
     {
       decrypt_input = ep->input;
       if (encrypt_verbose)
@@ -754,14 +762,14 @@ static void
 encrypt_keyid (struct key_info *kp, unsigned char *keyid, int len)
 {
   Encryptions *ep;
-  unsigned char *strp, *cp;
   int dir = kp->dir;
   int ret = 0;
 
   if (len > MAXKEYLEN)
     len = MAXKEYLEN;
 
-  if (!(ep = (*kp->getcrypt) (*kp->modep)))
+  ep = (*kp->getcrypt) (*kp->modep);
+  if (!ep)
     {
       if (len == 0)
        return;
@@ -862,7 +870,8 @@ encrypt_start_output (int type)
   unsigned char *p;
   int i;
 
-  if (!(ep = findencryption (type)))
+  ep = findencryption (type);
+  if (!ep)
     {
       if (encrypt_debug_mode)
        {
@@ -970,7 +979,6 @@ encrypt_send_request_end (void)
 void
 encrypt_wait (void)
 {
-  int encrypt, decrypt;
   if (encrypt_debug_mode)
     printf (">>>%s: in encrypt_wait\r\n", Name);
   if (!havesessionkey || !(I_SUPPORT_ENCRYPT & remote_supports_decrypt))
diff --git a/libtelnet/kerberos5.c b/libtelnet/kerberos5.c
index 9ac4ab3..e1280e9 100644
--- a/libtelnet/kerberos5.c
+++ b/libtelnet/kerberos5.c
@@ -443,7 +443,7 @@ kerberos5_status (TN_Authenticator * ap, char *name, size_t 
len,
   return AUTH_USER;
 }
 
-int
+static int
 kerberos5_is_auth (TN_Authenticator * ap, unsigned char *data, int cnt,
                   char *errbuf, int errbuflen)
 {
@@ -639,7 +639,7 @@ kerberos5_is_auth (TN_Authenticator * ap, unsigned char 
*data, int cnt,
 }
 
 # ifdef FORWARD
-int
+static int
 kerberos5_is_forward (TN_Authenticator * ap, unsigned char *data, int cnt,
                      char *errbuf, int errbuflen)
 {
diff --git a/libtelnet/shishi.c b/libtelnet/shishi.c
index c40b05f..34b0446 100644
--- a/libtelnet/shishi.c
+++ b/libtelnet/shishi.c
@@ -62,13 +62,14 @@ Shishi_ap *auth_handle;
 extern void printsub (char, unsigned char *, int);
 
 static int
-Data (TN_Authenticator * ap, int type, unsigned char *d, int c)
+Data (TN_Authenticator * ap, int type, void * d, int c)
 {
   unsigned char *p = str_data + 4;
   unsigned char *cd = (unsigned char *) d;
 
+  /* Submitted as test data.  */
   if (c == -1)
-    c = strlen (cd);
+    c = strlen ((char *) cd);
 
   if (auth_debug_mode)
     {
@@ -293,18 +294,18 @@ krb5shishi_send (TN_Authenticator * ap)
 }
 
 # ifdef ENCRYPTION
-void
+static void
 shishi_init_key (Session_Key * skey, int type)
 {
   int32_t etype = shishi_key_type (enckey);
 
-  if (etype == SHISHI_DES_CBC_CRC ||
-      etype == SHISHI_DES_CBC_MD4 || etype == SHISHI_DES_CBC_MD5)
+  if (etype == SHISHI_DES_CBC_CRC || etype == SHISHI_DES_CBC_MD4
+      || etype == SHISHI_DES_CBC_MD5)
     skey->type = SK_DES;
   else
     skey->type = SK_OTHER;
   skey->length = shishi_key_length (enckey);
-  skey->data = shishi_key_value (enckey);
+  skey->data = (unsigned char *) shishi_key_value (enckey);
 
   encrypt_session_key (skey, type);
 }
@@ -363,7 +364,8 @@ krb5shishi_reply (TN_Authenticator * ap, unsigned char 
*data, int cnt)
     case KRB_RESPONSE:
       if ((ap->way & AUTH_HOW_MASK) == AUTH_HOW_MUTUAL)
        {
-         if (shishi_ap_rep_verify_der (auth_handle, data, cnt) != SHISHI_OK)
+         if (shishi_ap_rep_verify_der (auth_handle, (char *) data, cnt)
+             != SHISHI_OK)
            {
              printf ("[ Mutual authentication failed ]\r\n");
              auth_send_retry ();
@@ -395,7 +397,6 @@ int
 krb5shishi_status (TN_Authenticator * ap, char *name, size_t len,
                   int level)
 {
-  int rc;
   int status;
 
   if (level < AUTH_USER)
@@ -416,11 +417,11 @@ krb5shishi_status (TN_Authenticator * ap, char *name, 
size_t len,
   return status;
 }
 
-int
+static int
 krb5shishi_is_auth (TN_Authenticator * a, unsigned char *data, int cnt,
                    char *errbuf, int errbuflen)
 {
-  Shishi_key *key, *key2;
+  Shishi_key *key;
   int rc;
   char *cnamerealm, *server = NULL, *realm = NULL;
   size_t cnamerealmlen;
@@ -530,7 +531,7 @@ krb5shishi_is_auth (TN_Authenticator * a, unsigned char 
*data, int cnt,
       return 1;
     }
 
-  rc = shishi_ap_req_der_set (auth_handle, data, cnt);
+  rc = shishi_ap_req_der_set (auth_handle, (char *) data, cnt);
   if (rc != SHISHI_OK)
     {
       snprintf (errbuf, errbuflen,
diff --git a/telnet/authenc.c b/telnet/authenc.c
index 3210a0c..e47304f 100644
--- a/telnet/authenc.c
+++ b/telnet/authenc.c
@@ -95,7 +95,7 @@ telnet_spin ()
 char *
 telnet_getenv (char *val)
 {
-  return ((char *) env_getvalue ((unsigned char *) val));
+  return ((char *) env_getvalue (val));
 }
 
 char *

http://git.savannah.gnu.org/cgit/inetutils.git/commit/?id=9ee96c972996b39b42b880d8e3c4c031440e3324


commit 9ee96c972996b39b42b880d8e3c4c031440e3324
Author: Mats Erik Andersson <address@hidden>
Date:   Fri May 17 13:54:40 2013 +0200

    ftp, telnet: Erase passwords after use.

diff --git a/ChangeLog b/ChangeLog
index 679cf43..2b000c1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,17 @@
 2013-05-17  Mats Erik Andersson  <address@hidden>
 
+       ftp, telnet: Erase passwords after use.
+
+       * ftp/cmds.c (user): Erase password string after getpass().
+       (account): Likewise, for account password.
+       * ftp/ftp.c (login): Erase passwords after last use.
+       (command): Print fake account password as debug text.
+
+       * telnet/authenc.c (telnet_gets): Do assignment before
+       if-statement.  Erase string found by getpass().
+
+2013-05-17  Mats Erik Andersson  <address@hidden>
+
        libtelnet: Let input to printsub functions remain
        typed as `unsigned char *', but use `char *' for all
        printable output.
diff --git a/ftp/cmds.c b/ftp/cmds.c
index 93aafcd..ee46508 100644
--- a/ftp/cmds.c
+++ b/ftp/cmds.c
@@ -1676,6 +1676,8 @@ user (int argc, char **argv)
       if (argc < 3)
        argv[2] = getpass ("Password: "), argc++;
       n = command ("PASS %s", argv[2]);
+      if (argv[2])
+       memset (argv[2], 0, strlen (argv[2]));
     }
   if (n == CONTINUE)
     {
@@ -1994,6 +1996,8 @@ account (int argc, char **argv)
       ap = getpass ("Account:");
     }
   command ("ACCT %s", ap);
+  if (ap)
+    memset (ap, 0, strlen (ap));
 }
 
 jmp_buf abortprox;
diff --git a/ftp/ftp.c b/ftp/ftp.c
index 34ef42d..f217f42 100644
--- a/ftp/ftp.c
+++ b/ftp/ftp.c
@@ -330,12 +330,16 @@ login (char *host)
       if (pass == NULL)
        pass = getpass ("Password:");
       n = command ("PASS %s", pass);
+      if (pass)
+       memset (pass, 0, strlen (pass));
     }
   if (n == CONTINUE)
     {
       aflag++;
       acct = getpass ("Account:");
       n = command ("ACCT %s", acct);
+      if (acct)
+       memset (acct, 0, strlen (acct));
     }
   if (n != COMPLETE)
     {
@@ -343,7 +347,10 @@ login (char *host)
       return (0);
     }
   if (!aflag && acct != NULL)
-    command ("ACCT %s", acct);
+    {
+      command ("ACCT %s", acct);
+      memset (acct, 0, strlen (acct));
+    }
   if (proxy)
     return (1);
   for (n = 0; n < macnum; ++n)
@@ -389,6 +396,8 @@ command (const char *fmt, ...)
       va_start (ap, fmt);
       if (strncmp ("PASS ", fmt, 5) == 0)
        printf ("PASS XXXX");
+      if (strncmp ("ACCT ", fmt, 5) == 0)
+       printf ("ACCT XXXX");
       else
        vfprintf (stdout, fmt, ap);
       va_end (ap);
diff --git a/telnet/authenc.c b/telnet/authenc.c
index f53d274..3210a0c 100644
--- a/telnet/authenc.c
+++ b/telnet/authenc.c
@@ -114,10 +114,15 @@ telnet_gets (char *prompt, char *result, int length, int 
echo)
       printf ("%s", prompt);
       res = fgets (result, length, stdin);
     }
-  else if (res = getpass (prompt))
+  else
     {
-      strncpy (result, res, length);
-      res = result;
+      res = getpass (prompt);
+      if (res)
+       {
+         strncpy (result, res, length);
+         memset (res, 0, strlen (res));
+         res = result;
+       }
     }
   TerminalNewMode (om);
   return (res);

http://git.savannah.gnu.org/cgit/inetutils.git/commit/?id=a98c1047accf76e0264fe76c4644246524aacc0d


commit a98c1047accf76e0264fe76c4644246524aacc0d
Author: Mats Erik Andersson <address@hidden>
Date:   Fri May 17 12:14:07 2013 +0200

    libtelnet: Standard type for strings.

diff --git a/ChangeLog b/ChangeLog
index c19fdff..679cf43 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,33 @@
+2013-05-17  Mats Erik Andersson  <address@hidden>
+
+       libtelnet: Let input to printsub functions remain
+       typed as `unsigned char *', but use `char *' for all
+       printable output.
+
+       * libtelnet/auth-proto.h (auth_printsub, auth_sendname)
+       (kerberos4_printsub, kerberos5_printsub)
+       krb5shishi_printsub): Update signatures.
+       * libtelnet/auth.h (TN_Authenticator): Update `*printsub'.
+       * libtelnet/enc-proto.h (encrypt_printsub, krbdes_printsub)
+       (cfb64_printsub, ofb64_printsub): Update signatures.
+       * libtelnet/encrypt.h (Encryptions): Update `*printsub'.
+
+       * libtelnet/auth.c (auth_sendname): Rename first argument
+       and change to `char *'.  New variable CP.
+       (auth_gen_printsub): Change third argument and variables
+       CP and TBUF to `char *'.
+       (auth_printsub): Change third argument to `char *'.
+       * libtelnet/enc_des.c (fb64_printsub, cfb64_printsub)
+       (ofb64_printsub): Likewise.
+       * libtelnet/encrypt.c (encrypt_gen_printsub)
+       (encrypt_printsub): Likewise.
+       * libtelnet/kerberos.c (kerberos4_printsub): Likewise.
+       * libtelnet/kerberos5.c (kerberos5_printsub): Likewise.
+       * libtelnet/shishi.c (krb5shisih_printsub): Likewise.
+
+       * telnetd/utility.c (printsub) [AUTHENTICATION || ENCRYPTION]:
+       Change BUF to `char *'.
+
 2013-05-15  Mats Erik Andersson  <address@hidden>
 
        rshd: Report client's principal name.
diff --git a/libtelnet/auth-proto.h b/libtelnet/auth-proto.h
index 975a395..1c6e9fe 100644
--- a/libtelnet/auth-proto.h
+++ b/libtelnet/auth-proto.h
@@ -81,8 +81,8 @@ void auth_finished (TN_Authenticator *, int);
 int auth_wait (char *, size_t);
 void auth_name (unsigned char *, int);
 void auth_disable_name (char *);
-void auth_printsub (unsigned char *, int, unsigned char *, int);
-int auth_sendname (unsigned char *, int);
+void auth_printsub (unsigned char *, int, char *, int);
+int auth_sendname (char *, int);
 
 # ifdef        KRB4
 int kerberos4_init (TN_Authenticator *, int);
@@ -90,7 +90,7 @@ int kerberos4_send (TN_Authenticator *);
 void kerberos4_is (TN_Authenticator *, unsigned char *, int);
 void kerberos4_reply (TN_Authenticator *, unsigned char *, int);
 int kerberos4_status (TN_Authenticator *, char *, size_t, int);
-void kerberos4_printsub (unsigned char *, int, unsigned char *, int);
+void kerberos4_printsub (unsigned char *, int, char *, int);
 # endif
 
 # ifdef        KRB5
@@ -99,7 +99,7 @@ int kerberos5_send (TN_Authenticator *);
 void kerberos5_is (TN_Authenticator *, unsigned char *, int);
 void kerberos5_reply (TN_Authenticator *, unsigned char *, int);
 int kerberos5_status (TN_Authenticator *, char *, size_t, int);
-void kerberos5_printsub (unsigned char *, int, unsigned char *, int);
+void kerberos5_printsub (unsigned char *, int, char *, int);
 # endif
 
 # ifdef        SHISHI
@@ -108,7 +108,7 @@ int krb5shishi_send (TN_Authenticator *);
 void krb5shishi_is (TN_Authenticator *, unsigned char *, int);
 void krb5shishi_reply (TN_Authenticator *, unsigned char *, int);
 int krb5shishi_status (TN_Authenticator *, char *, size_t, int);
-void krb5shishi_printsub (unsigned char *, int, unsigned char *, int);
+void krb5shishi_printsub (unsigned char *, int, char *, int);
 void krb5shishi_cleanup (TN_Authenticator *);
 # endif
 #endif
diff --git a/libtelnet/auth.c b/libtelnet/auth.c
index e697bb2..13fb824 100644
--- a/libtelnet/auth.c
+++ b/libtelnet/auth.c
@@ -629,12 +629,13 @@ auth_name (unsigned char *data, int cnt)
 }
 
 int
-auth_sendname (unsigned char *cp, int len)
+auth_sendname (char *name, int len)
 {
   static unsigned char str_request[256 + 6]
     = { IAC, SB, TELOPT_AUTHENTICATION, TELQUAL_NAME, };
   register unsigned char *e = str_request + 4;
   register unsigned char *ee = &str_request[sizeof (str_request) - 2];
+  unsigned char *cp = (unsigned char *) name;
 
   while (--len >= 0)
     {
@@ -708,11 +709,11 @@ auth_debug (int mode)
 }
 
 static void
-auth_gen_printsub (unsigned char *data, int cnt, unsigned char *buf,
+auth_gen_printsub (unsigned char *data, int cnt, char *buf,
                   int buflen)
 {
-  register unsigned char *cp;
-  unsigned char tbuf[16];
+  register char *cp;
+  char tbuf[16];
 
   cnt -= 3;
   data += 3;
@@ -721,7 +722,7 @@ auth_gen_printsub (unsigned char *data, int cnt, unsigned 
char *buf,
   buflen -= 2;
   for (; cnt > 0; cnt--, data++)
     {
-      sprintf ((char *) tbuf, " %d", *data);
+      sprintf (tbuf, " %d", *data);
       for (cp = tbuf; *cp && buflen > 0; --buflen)
        *buf++ = *cp++;
       if (buflen <= 0)
@@ -731,7 +732,7 @@ auth_gen_printsub (unsigned char *data, int cnt, unsigned 
char *buf,
 }
 
 void
-auth_printsub (unsigned char *data, int cnt, unsigned char *buf, int buflen)
+auth_printsub (unsigned char *data, int cnt, char *buf, int buflen)
 {
   TN_Authenticator *ap;
 
diff --git a/libtelnet/auth.h b/libtelnet/auth.h
index 340acb5..59f05d8 100644
--- a/libtelnet/auth.h
+++ b/libtelnet/auth.h
@@ -96,7 +96,7 @@ typedef struct XauthP
   void (*is) (struct XauthP *, unsigned char *, int);
   void (*reply) (struct XauthP *, unsigned char *, int);
   int (*status) (struct XauthP *, char *, size_t, int);
-  void (*printsub) (unsigned char *, int, unsigned char *, int);
+  void (*printsub) (unsigned char *, int, char *, int);
   void (*cleanup) (struct XauthP *);
 } TN_Authenticator;
 
diff --git a/libtelnet/enc-proto.h b/libtelnet/enc-proto.h
index 8632733..ff58dc4 100644
--- a/libtelnet/enc-proto.h
+++ b/libtelnet/enc-proto.h
@@ -102,7 +102,7 @@ void encrypt_send_support (void);
 void encrypt_dec_keyid (unsigned char *, int);
 void encrypt_enc_keyid (unsigned char *, int);
 void encrypt_send_keyid (int, unsigned char *, int, int);
-void encrypt_printsub (unsigned char *, int, unsigned char *, int);
+void encrypt_printsub (unsigned char *, int, char *, int);
 int net_write (unsigned char *, int);
 
 # ifdef        TELNETD
@@ -119,7 +119,7 @@ int krbdes_reply (unsigned char *, int);
 void krbdes_init (int);
 int krbdes_start (int, int);
 void krbdes_session (Session_Key *, int);
-void krbdes_printsub (unsigned char *, int, unsigned char *, int);
+void krbdes_printsub (unsigned char *, int, char *, int);
 
 void cfb64_encrypt (unsigned char *, int);
 int cfb64_decrypt (int);
@@ -129,7 +129,7 @@ int cfb64_is (unsigned char *, int);
 int cfb64_reply (unsigned char *, int);
 void cfb64_session (Session_Key *, int);
 int cfb64_keyid (int, unsigned char *, int *);
-void cfb64_printsub (unsigned char *, int, unsigned char *, int);
+void cfb64_printsub (unsigned char *, int, char *, int);
 
 void ofb64_encrypt (unsigned char *, int);
 int ofb64_decrypt (int);
@@ -139,7 +139,7 @@ int ofb64_is (unsigned char *, int);
 int ofb64_reply (unsigned char *, int);
 void ofb64_session (Session_Key *, int);
 int ofb64_keyid (int, unsigned char *, int *);
-void ofb64_printsub (unsigned char *, int, unsigned char *, int);
+void ofb64_printsub (unsigned char *, int, char *, int);
 
 int des_new_random_key (Block);
 void des_set_random_generator_seed (Block);
diff --git a/libtelnet/enc_des.c b/libtelnet/enc_des.c
index 99450d9..2b348a1 100644
--- a/libtelnet/enc_des.c
+++ b/libtelnet/enc_des.c
@@ -566,7 +566,7 @@ fb64_keyid (int dir, unsigned char *kp, int *lenp, struct 
fb *fbp)
 
 static void
 fb64_printsub (unsigned char *data, int cnt,
-              unsigned char *buf, int buflen,
+              char *buf, int buflen,
               const char *type)
 {
   char lbuf[32];
@@ -611,7 +611,7 @@ fb64_printsub (unsigned char *data, int cnt,
 
 void
 cfb64_printsub (unsigned char *data, int cnt,
-               unsigned char *buf, int buflen)
+               char *buf, int buflen)
 {
   fb64_printsub (data, cnt, buf, buflen, "CFB64");
 }
@@ -619,7 +619,7 @@ cfb64_printsub (unsigned char *data, int cnt,
 #   ifdef ENCTYPE_DES_OFB64
 void
 ofb64_printsub (unsigned char *data, int cnt,
-               unsigned char *buf, int buflen)
+               char *buf, int buflen)
 {
   fb64_printsub (data, cnt, buf, buflen, "OFB64");
 }
diff --git a/libtelnet/encrypt.c b/libtelnet/encrypt.c
index c67e61b..5d59b0c 100644
--- a/libtelnet/encrypt.c
+++ b/libtelnet/encrypt.c
@@ -988,7 +988,7 @@ encrypt_debug (int mode)
 
 static void
 encrypt_gen_printsub (unsigned char *data, int cnt,
-                     unsigned char *buf, int buflen)
+                     char *buf, int buflen)
 {
   char tbuf[16], *cp;
 
@@ -1010,7 +1010,7 @@ encrypt_gen_printsub (unsigned char *data, int cnt,
 
 void
 encrypt_printsub (unsigned char *data, int cnt,
-                 unsigned char *buf, int buflen)
+                 char *buf, int buflen)
 {
   Encryptions *ep;
   int type = data[1];
diff --git a/libtelnet/encrypt.h b/libtelnet/encrypt.h
index f65b18f..db4cc4b 100644
--- a/libtelnet/encrypt.h
+++ b/libtelnet/encrypt.h
@@ -142,7 +142,7 @@ typedef struct
   int (*reply) (unsigned char *, int);
   void (*session) (Session_Key *, int);
   int (*keyid) (int, unsigned char *, int *);
-  void (*printsub) (unsigned char *, int, unsigned char *, int);
+  void (*printsub) (unsigned char *, int, char *, int);
 } Encryptions;
 
 #  define SK_DES               1       /* Matched Kerberos v5 KEYTYPE_DES */
diff --git a/libtelnet/kerberos.c b/libtelnet/kerberos.c
index 74179c1..1608d67 100644
--- a/libtelnet/kerberos.c
+++ b/libtelnet/kerberos.c
@@ -498,7 +498,8 @@ kerberos4_status (ap, name, len, level)
 
 void
 kerberos4_printsub (data, cnt, buf, buflen)
-     unsigned char *data, *buf;
+     unsigned char *data;
+     char *buf;
      int cnt, buflen;
 {
   char lbuf[32];
diff --git a/libtelnet/kerberos5.c b/libtelnet/kerberos5.c
index 521def6..9ac4ab3 100644
--- a/libtelnet/kerberos5.c
+++ b/libtelnet/kerberos5.c
@@ -745,7 +745,7 @@ req_type_str (int type)
 
 void
 kerberos5_printsub (unsigned char *data, int cnt,
-                   unsigned char *buf, int buflen)
+                   char *buf, int buflen)
 {
   char *p;
   int i;
diff --git a/libtelnet/shishi.c b/libtelnet/shishi.c
index d51ec41..c40b05f 100644
--- a/libtelnet/shishi.c
+++ b/libtelnet/shishi.c
@@ -683,7 +683,7 @@ req_type_str (int type)
 
 void
 krb5shishi_printsub (unsigned char *data, int cnt,
-                    unsigned char *buf, int buflen)
+                    char *buf, int buflen)
 {
   char *p;
   int i;
diff --git a/telnetd/utility.c b/telnetd/utility.c
index be3507f..729bd5f 100644
--- a/telnetd/utility.c
+++ b/telnetd/utility.c
@@ -937,7 +937,7 @@ printsub (int direction, unsigned char *pointer, int length)
   register int i = 0;
 
 #if defined AUTHENTICATION || defined ENCRYPTION
-  unsigned char buf[512];
+  char buf[512];
 #endif
 
   /* Silence unwanted debugging to '/tmp/telnet.debug'.

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog              |   86 ++++++++++++++++++++++++++++++++++++++++++++++++
 configure.ac           |   13 +++++++
 ftp/cmds.c             |    4 ++
 ftp/ftp.c              |   11 +++++-
 libtelnet/auth-proto.h |   10 +++---
 libtelnet/auth.c       |   24 +++++++-------
 libtelnet/auth.h       |    2 +-
 libtelnet/enc-proto.h  |    8 ++--
 libtelnet/enc_des.c    |   20 +++++++----
 libtelnet/encrypt.c    |   45 ++++++++++++++++---------
 libtelnet/encrypt.h    |    2 +-
 libtelnet/kerberos.c   |    3 +-
 libtelnet/kerberos5.c  |    6 ++--
 libtelnet/shishi.c     |   25 +++++++-------
 telnet/authenc.c       |   13 +++++--
 telnetd/utility.c      |    2 +-
 16 files changed, 206 insertions(+), 68 deletions(-)


hooks/post-receive
-- 
GNU Inetutils 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]