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-150-g4168c


From: Mats Erik Andersson
Subject: [SCM] GNU Inetutils branch, master, updated. inetutils-1_9_1-150-g4168cfe
Date: Fri, 17 Aug 2012 01:30:59 +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  4168cfe85d2a99c4b0f3eeef889f3bef637cd5e2 (commit)
      from  32746bf6648bdad78000ae5b39d4841d36a334a4 (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=4168cfe85d2a99c4b0f3eeef889f3bef637cd5e2


commit 4168cfe85d2a99c4b0f3eeef889f3bef637cd5e2
Author: Mats Erik Andersson <address@hidden>
Date:   Fri Aug 17 03:29:15 2012 +0200

    telnet: Activate principal naming.

diff --git a/ChangeLog b/ChangeLog
index 356d739..d25bdb4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2012-08-17  Mats Erik Andersson  <address@hidden>
+
+       telnet: Selectable principal name.
+
+       * libtelnet/shishi.c (krb5shishi_send): Add a prefix
+       `host/' to RemoteHostName only if a prefix is missing.
+       * telnet/commands.c (tn) [AUTHENTICATION || ENCRYPTION]:
+       Strip off any prefix from HOSTP before resolving address.
+       [IPV6]: Improve error message at failed resolution.
+
 2012-08-16  Mats Erik Andersson  <address@hidden>
 
        telnetd: Configurable principal name.
diff --git a/libtelnet/shishi.c b/libtelnet/shishi.c
index 1a21624..0ffd6a9 100644
--- a/libtelnet/shishi.c
+++ b/libtelnet/shishi.c
@@ -173,7 +173,13 @@ krb5shishi_send (TN_Authenticator * ap)
       DEBUG (("telnet: Kerberos V5: shishi memory allocation failed\r\n"));
       return 0;
     }
-  sprintf (tmp, "host/%s", RemoteHostName);
+
+  /* Check for Kerberos prefix in principal name.  */
+  if (strchr (RemoteHostName, '/'))
+    strcpy (tmp, RemoteHostName);
+  else
+    sprintf (tmp, "host/%s", RemoteHostName);
+
   memset (&hint, 0, sizeof (hint));
   hint.server = tmp;
   hint.client = UserNameRequested;
diff --git a/telnet/commands.c b/telnet/commands.c
index 6a1be36..b511e4c 100644
--- a/telnet/commands.c
+++ b/telnet/commands.c
@@ -2555,6 +2555,18 @@ tn (int argc, char *argv[])
       return 0;
     }
 
+#if defined AUTHENTICATION || defined ENCRYPTION
+  {
+    /* Extract instance name of server, eliminating
+     * the Kerberos principal prefix.
+     */
+    char *p = strchr (hostp, '/');
+
+    if (p)
+      hostp = ++p;
+  }
+#endif /* AUTHENTICATION || ENCRYPTION */
+
 #ifdef IPV6
   hints.ai_socktype = SOCK_STREAM;
 
@@ -2568,7 +2580,7 @@ tn (int argc, char *argv[])
       else
        errmsg = gai_strerror (err);
 
-      printf ("%s/%s: lookup failure: %s\n", hostp, portp, errmsg);
+      printf ("Server lookup failure:  %s:%s, %s\n", hostp, portp, errmsg);
       return 0;
     }
 

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

Summary of changes:
 ChangeLog          |   10 ++++++++++
 libtelnet/shishi.c |    8 +++++++-
 telnet/commands.c  |   14 +++++++++++++-
 3 files changed, 30 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
GNU Inetutils 



reply via email to

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