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-151-gdf22b


From: Mats Erik Andersson
Subject: [SCM] GNU Inetutils branch, master, updated. inetutils-1_9_1-151-gdf22b0e
Date: Tue, 21 Aug 2012 21:37:03 +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  df22b0e7de1a35caad2cce9733d015c877486d0c (commit)
      from  4168cfe85d2a99c4b0f3eeef889f3bef637cd5e2 (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=df22b0e7de1a35caad2cce9733d015c877486d0c


commit df22b0e7de1a35caad2cce9733d015c877486d0c
Author: Mats Erik Andersson <address@hidden>
Date:   Mon Aug 20 23:08:20 2012 +0200

    Realm for server lookup.

diff --git a/ChangeLog b/ChangeLog
index d25bdb4..ae1adff 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2012-08-20  Mats Erik Andersson  <address@hidden>
+
+       Server realm pairing: Let server name determine
+       realm to be contacted, as per library configuration.
+
+       * libinetutils/shishi.c (shishi_auth): Whenever realm
+       is not explicit, call shishi_realm_for_server() to get
+       a usable realm; pass on to shishi_realm_default_set().
+       * libtelnet/shishi.c (krb5shishi_send): Likewise.
+
 2012-08-17  Mats Erik Andersson  <address@hidden>
 
        telnet: Selectable principal name.
diff --git a/libinetutils/shishi.c b/libinetutils/shishi.c
index d023081..98f3662 100644
--- a/libinetutils/shishi.c
+++ b/libinetutils/shishi.c
@@ -28,7 +28,7 @@
 # include <unistd.h>
 # include <shishi_def.h>
 
-/* shishi authentication */
+/* shishi authentication, client side */
 int
 shishi_auth (Shishi ** handle, int verbose, char **cname,
             const char *sname, int sock, char *cmd,
@@ -130,6 +130,19 @@ shishi_auth (Shishi ** handle, int verbose, char **cname,
   else
     sprintf (tmpserver, "%s/%s", SERVICE, sname + (p ? 1 : 0));
 
+  /* Retrieve realm assigned to this server as per configuration,
+   * unless an explicit domain was passed in the call.
+   */
+  if (!realm)
+    {
+      if (!p)
+       p = sname;
+      else if (*p == '/')
+       ++p;
+
+      shishi_realm_default_set (h, shishi_realm_for_server (h, p));
+    }
+
   hint.client = (char *) *cname;
   hint.server = (char *) tmpserver;
 
@@ -254,6 +267,7 @@ senderror (int s, char type, char *buf)
   write (s, buf, strlen (buf));
 }
 
+/* shishi authentication, server side */
 int
 get_auth (int infd, Shishi ** handle, Shishi_ap ** ap,
          Shishi_key ** enckey, const char **err_msg, int *protoversion,
diff --git a/libtelnet/shishi.c b/libtelnet/shishi.c
index 0ffd6a9..32a59e6 100644
--- a/libtelnet/shishi.c
+++ b/libtelnet/shishi.c
@@ -186,6 +186,19 @@ krb5shishi_send (TN_Authenticator * ap)
 
   if (dest_realm && *dest_realm)
     shishi_realm_default_set (shishi_handle, dest_realm);
+  else
+    {
+      /* Retrieve realm assigned to this server as per configuration.  */
+      char *p = strchr (RemoteHostName, '/');
+
+      if (p)
+       ++p;
+      else
+       p = RemoteHostName;
+
+      shishi_realm_default_set (shishi_handle,
+                               shishi_realm_for_server (shishi_handle, p));
+    }
 
   tkt = shishi_tkts_get (shishi_tkts_default (shishi_handle), &hint);
   free (tmp);

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

Summary of changes:
 ChangeLog             |   10 ++++++++++
 libinetutils/shishi.c |   16 +++++++++++++++-
 libtelnet/shishi.c    |   13 +++++++++++++
 3 files changed, 38 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
GNU Inetutils 



reply via email to

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