[Bug 2267] Host matching uses modified hostname as well as original

bugzilla-daemon at mindrot.org bugzilla-daemon at mindrot.org
Tue Sep 2 04:02:56 EST 2014


https://bugzilla.mindrot.org/show_bug.cgi?id=2267

--- Comment #8 from Richard Birkett <openssh at richard.birkett.com> ---
Thanks for attachment 2467 (attempt #3).

Looks much better!

I've put together a config file that tests all the different hostnames
(original from the command-line and HostName, bare and canonicalised)
against each of the different criteria, and the results are below. 
Each is Y (matched) or N (didn't match).

With canonicalisation off:
                                cmdline         HostName
                               bare  canon     bare  canon
Host                            Y     N         N     N
Match originalhost              Y     N         N     N
Match host                      N     N         Y     N
Match canonical originalhost    N     N         N     N
Match canonical host            N     N         N     N

With canonicalisation on, the second pass gives:
                                cmdline         HostName
                               bare  canon     bare  canon
Host                            Y++   N++       N     N
Match originalhost              Y     N         N     N
Match host                      N     N         Y     N
Match canonical originalhost    Y**   N**       N     N
Match canonical host            N     N         Y**   N**

** looks like a bug
++ also looks like a bug (but is actually the behaviour I'd prefer!)

My proposal would give this:
                                original        HostName
                               bare  canon     bare  canon
Host                            Y     N         N     N
Match originalhost              Y     N         N     N
Match host                      N     N         Y     N
Match canonical originalhost    N     Y         N     N
Match canonical host            N     N         N     Y

(with the global CanonicalizeHostname option causing the first three
lines to mirror the last two).

Incidently, RereadConfig seems to be defaulting to "no" instead of
"if-canon", I think because fill_default_options is called too late. 
So for the above tests I've set it to "if-canon" explicitly.

-- 
You are receiving this mail because:
You are watching someone on the CC list of the bug.
You are watching the assignee of the bug.


More information about the openssh-bugs mailing list