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-14-g17e249


From: Mats Erik Andersson
Subject: [SCM] GNU Inetutils branch, master, updated. inetutils-1_9_1-14-g17e2496
Date: Fri, 27 Jan 2012 21:33:29 +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  17e24964ca9fded438753c378e746bf1fb407924 (commit)
      from  408acfb3c91204651d2c69be0443bbf4c6ce8be8 (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=17e24964ca9fded438753c378e746bf1fb407924


commit 17e24964ca9fded438753c378e746bf1fb407924
Author: Mats Erik Andersson <address@hidden>
Date:   Fri Jan 27 22:32:19 2012 +0100

    libtelnet: Wrong declaration, missing prototypes.

diff --git a/ChangeLog b/ChangeLog
index 13f58a8..b854c55 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,25 @@
 2012-01-27  Mats Erik Andersson <address@hidden>
 
+       * libtelnet/auth.c, libtelnet/enc_des.c, libtelnet/encrypt.c,
+       libtelnet/kerberos.c, libtelnet/kerberos5.c, libtelnet/shishi.c:
+       Add external prototype `void printsub (char, unsigned char *, int)',
+       appearing as callback.
+       * libtelnet/auth-proto.h (auth_gen_printsub): Remove prototype.
+       (auth_printsub): Missing prototype.
+       * libtelnet/auth.c (auth_gen_printsub): Declare as static, and
+       position before code for `auth_printsub'.
+       * libtelnet/enc-proto.h (encrypt_printsub): Missing prototype.
+       [ENCRYPTION && TELNETD]: Rename macro TELENTD as TELNETD,
+       both are otherwise not in use.
+       * libtelnet/encrypt.c (encrypt_gen_printsub): Reorder parameters
+       in declaration to read `(unsigned char *, int, unsigned char *, int)'.
+       (encrypt_printsub): Likewise.
+       * telnet/utilities.c [AUTHENTICATION]: Include <libtelnet/auth.h>.
+       [ENCRYPTION]: Include <libtelnet/encrypt.h>.
+       * telnetd/telnetd.h: Include <libtelnet/encrypt.h>.
+
+2012-01-27  Mats Erik Andersson <address@hidden>
+
        * tests/ftp-localhost.sh, tests/tftp.sh (PORT): Detect if it
        is preset, or detect an unused value from a short list.
 
diff --git a/libtelnet/auth-proto.h b/libtelnet/auth-proto.h
index 1735954..f155d36 100644
--- a/libtelnet/auth-proto.h
+++ b/libtelnet/auth-proto.h
@@ -80,7 +80,7 @@ void auth_reply (unsigned char *, int);
 void auth_finished (TN_Authenticator *, int);
 int auth_wait (char *);
 void auth_disable_name (char *);
-void auth_gen_printsub (unsigned char *, int, unsigned char *, int);
+void auth_printsub (unsigned char *, int, unsigned char *, int);
 int auth_sendname (unsigned char *, int);
 
 # ifdef        KRB4
diff --git a/libtelnet/auth.c b/libtelnet/auth.c
index eaa11f0..0ffd804 100644
--- a/libtelnet/auth.c
+++ b/libtelnet/auth.c
@@ -93,6 +93,9 @@
 
 # define typemask(x)           (1<<((x)-1))
 
+/* Callback from consumer.  */
+extern void printsub (char, unsigned char *, int);
+
 # ifdef        KRB4_ENCPWD
 extern krb4encpwd_init ();
 extern krb4encpwd_send ();
@@ -694,18 +697,7 @@ auth_debug (int mode)
   auth_debug_mode = mode;
 }
 
-void
-auth_printsub (unsigned char *data, int cnt, unsigned char *buf, int buflen)
-{
-  TN_Authenticator *ap;
-
-  if ((ap = findauthenticator (data[1], data[2])) && ap->printsub)
-    (*ap->printsub) (data, cnt, buf, buflen);
-  else
-    auth_gen_printsub (data, cnt, buf, buflen);
-}
-
-void
+static void
 auth_gen_printsub (unsigned char *data, int cnt, unsigned char *buf,
                   int buflen)
 {
@@ -727,4 +719,15 @@ auth_gen_printsub (unsigned char *data, int cnt, unsigned 
char *buf,
     }
   *buf = '\0';
 }
+
+void
+auth_printsub (unsigned char *data, int cnt, unsigned char *buf, int buflen)
+{
+  TN_Authenticator *ap;
+
+  if ((ap = findauthenticator (data[1], data[2])) && ap->printsub)
+    (*ap->printsub) (data, cnt, buf, buflen);
+  else
+    auth_gen_printsub (data, cnt, buf, buflen);
+}
 #endif
diff --git a/libtelnet/enc-proto.h b/libtelnet/enc-proto.h
index e78f7ec..d0c5f1b 100644
--- a/libtelnet/enc-proto.h
+++ b/libtelnet/enc-proto.h
@@ -86,9 +86,10 @@ void encrypt_send_end (void);
 void encrypt_wait (void);
 void encrypt_send_support (void);
 void encrypt_send_keyid (int, unsigned char *, int, int);
+void encrypt_printsub (unsigned char *, int, unsigned char *, int);
 int net_write (unsigned char *, int);
 
-# ifdef        TELENTD
+# ifdef        TELNETD
 void encrypt_wait (void);
 # else
 int encrypt_cmd (int, char **);
diff --git a/libtelnet/enc_des.c b/libtelnet/enc_des.c
index c4b5ef2..1a5dea8 100644
--- a/libtelnet/enc_des.c
+++ b/libtelnet/enc_des.c
@@ -132,6 +132,9 @@ struct keyidlist
 #   define FB64_IV_BAD 3
 
 
+/* Callback from consumer.  */
+extern void printsub (char, unsigned char *, int);
+
 void fb64_stream_iv (Block, struct stinfo *);
 void fb64_init (struct fb *);
 static int fb64_start (struct fb *, int, int);
diff --git a/libtelnet/encrypt.c b/libtelnet/encrypt.c
index 8b349a6..68b06f6 100644
--- a/libtelnet/encrypt.c
+++ b/libtelnet/encrypt.c
@@ -83,6 +83,9 @@
 # include <stdio.h>
 # include "genget.h"
 
+/* Callback from consumer.  */
+extern void printsub (char, unsigned char *, int);
+
 /*
  * These functions pointers point to the current routines
  * for encrypting and decrypting data.
@@ -967,9 +970,9 @@ encrypt_debug (int mode)
   encrypt_debug_mode = mode;
 }
 
-void
-encrypt_gen_printsub (unsigned char *data, unsigned char *buf,
-                     int cnt, int buflen)
+static void
+encrypt_gen_printsub (unsigned char *data, int cnt,
+                     unsigned char *buf, int buflen)
 {
   char tbuf[16], *cp;
 
@@ -990,8 +993,8 @@ encrypt_gen_printsub (unsigned char *data, unsigned char 
*buf,
 }
 
 void
-encrypt_printsub (unsigned char *data, unsigned char *buf,
-                 int cnt, int buflen)
+encrypt_printsub (unsigned char *data, int cnt,
+                 unsigned char *buf, int buflen)
 {
   Encryptions *ep;
   int type = data[1];
diff --git a/libtelnet/kerberos.c b/libtelnet/kerberos.c
index 7d79fd9..2158c1d 100644
--- a/libtelnet/kerberos.c
+++ b/libtelnet/kerberos.c
@@ -92,6 +92,9 @@ int kuserok (AUTH_DAT *, char *);
 
 extern auth_debug_mode;
 
+/* Callback from consumer.  */
+extern void printsub (char, unsigned char *, int);
+
 static unsigned char str_data[1024] = { IAC, SB, TELOPT_AUTHENTICATION, 0,
   AUTHTYPE_KERBEROS_V4,
 };
diff --git a/libtelnet/kerberos5.c b/libtelnet/kerberos5.c
index 4b4e36f..5e4165b 100644
--- a/libtelnet/kerberos5.c
+++ b/libtelnet/kerberos5.c
@@ -76,6 +76,9 @@ char *telnet_krb5_realm = NULL;
 
 # define DEBUG(c) if (auth_debug_mode) printf c
 
+/* Callback from consumer.  */
+extern void printsub (char, unsigned char *, int);
+
 static int
 Data (TN_Authenticator * ap, int type, krb5_pointer d, int c)
 {
diff --git a/libtelnet/shishi.c b/libtelnet/shishi.c
index a6bc478..4bf70c1 100644
--- a/libtelnet/shishi.c
+++ b/libtelnet/shishi.c
@@ -56,6 +56,9 @@ Shishi_ap *auth_handle;
 
 # define DEBUG(c) if (auth_debug_mode) printf c
 
+/* Callback from consumer.  */
+extern void printsub (char, unsigned char *, int);
+
 static int
 Data (TN_Authenticator * ap, int type, unsigned char *d, int c)
 {
diff --git a/telnet/utilities.c b/telnet/utilities.c
index 12a6b08..4da265a 100644
--- a/telnet/utilities.c
+++ b/telnet/utilities.c
@@ -66,6 +66,13 @@
 #include "defines.h"
 #include "externs.h"
 
+#ifdef AUTHENTICATION
+# include <libtelnet/auth.h>
+#endif
+#ifdef ENCRYPTION
+# include <libtelnet/encrypt.h>
+#endif
+
 FILE *NetTrace = 0;            /* Not in bss, since needs to stay */
 int prettydump;
 
diff --git a/telnetd/telnetd.h b/telnetd/telnetd.h
index 8a275ec..b0baa0a 100644
--- a/telnetd/telnetd.h
+++ b/telnetd/telnetd.h
@@ -50,7 +50,9 @@
 #include <sys/ioctl.h>
 
 #include <arpa/telnet.h>
+
 #include <libtelnet/auth.h>
+#include <libtelnet/encrypt.h>
 
 #include <termios.h>
 

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

Summary of changes:
 ChangeLog              |   20 ++++++++++++++++++++
 libtelnet/auth-proto.h |    2 +-
 libtelnet/auth.c       |   27 +++++++++++++++------------
 libtelnet/enc-proto.h  |    3 ++-
 libtelnet/enc_des.c    |    3 +++
 libtelnet/encrypt.c    |   13 ++++++++-----
 libtelnet/kerberos.c   |    3 +++
 libtelnet/kerberos5.c  |    3 +++
 libtelnet/shishi.c     |    3 +++
 telnet/utilities.c     |    7 +++++++
 telnetd/telnetd.h      |    2 ++
 11 files changed, 67 insertions(+), 19 deletions(-)


hooks/post-receive
-- 
GNU Inetutils 



reply via email to

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