[20093] in Athena Bugs

home help back first fref pref prev next nref lref last post

Re: SSH patch to deal with krb5 to non-reverse-resolving hosts

daemon@ATHENA.MIT.EDU (Derek Atkins)
Thu Jan 10 10:28:17 2002

To: Greg Hudson <ghudson@MIT.EDU>
Cc: bugs@MIT.EDU
From: Derek Atkins <warlord@MIT.EDU>
Date: 10 Jan 2002 10:28:15 -0500
In-Reply-To: Greg Hudson's message of "10 Jan 2002 10:21:28 -0500"
Message-ID: <sjmd70ikyy8.fsf@indiana.mit.edu>

Greg Hudson <ghudson@MIT.EDU> writes:

> So, I don't like either the old behavior or your proposed behavior.  The
> old behavior fails on hosts without proper PTR records, and your
> behavior fails on hosts without proper PTR records when what you typed
> in was a short name or cname for the hostname.

Um, no.  It works fine for hosts without a PTR record and what you
type is an alias.  I even tested it and it works...

[lovely text about gethostbyname() snipped]

This is exactly what I do.  Look closely at my patch:

+       if (orighost) {
+         struct hostent *hp_static;
+
+#if defined(SOCKS5) && !defined(HAVE_SOCKS_H)
+         hp_static = Rgethostbyname(orighost);
+#else
+         hp_static = gethostbyname(orighost);
+#endif
+         orighost = NULL;
+         if (hp_static) {
+           remotehost = xstrdup (hp_static->h_name);
+           krb5_free_cred_contents(ssh_context, &creds);
+           retry = 1;
+           continue;
+         }

-derek

-- 
       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
       warlord@MIT.EDU                        PGP key available

home help back first fref pref prev next nref lref last post