search for: match_host

Displaying 2 results from an estimated 2 matches for "match_host".

Did you mean: match_host_p
2001 Jun 04
0
[patch] user@host in AllowUsers
...1.28 auth.c --- auth.c 2001/03/19 22:15:57 1.28 +++ auth.c 2001/06/04 15:20:52 @@ -45,6 +45,56 @@ extern ServerOptions options; /* + match a hostname or an IP to a pattern. If the pattern only contains digits and '.' + then match as a IP, otherwise match as a hostname + */ +static int match_host(const char *host, const char *ip, const char *pattern) +{ + const char *p; + for (p=pattern; *p; p++) { + if (!strchr("0123456789*?.", *p)) { + /* treat as a hostname */ + return match_pattern(host, pattern); + } + } + return match_pattern(ip, pattern); +} + + +/* this combines the...
2017 Mar 01
7
[Bug 2685] New: Case sensitive hostname matching
...ase insensitive Currently ssh (and possibly sshd) match hostnames in a case sensitive manner. While recognise there are reasons this can be desired behaviour, the comments in code (and the generally accepted property of hostnames being case-instensitive - RFC 4343) suggest otherwise. Comment for match_hostname() (in match.c) even mentions explicitly, that the hostname is expected to be lowercased, which it has been not, since the d56b44d2dfa093883a5c4e91be3f72d99946b170 + eb6d870a0ea8661299bb2ea8f013d3ace04e2024 commit combo. I have no clear position on what to do with originalhost matching, though...