search for: match_hostname

Displaying 20 results from an estimated 20 matches for "match_hostname".

2007 Nov 11
0
Patch to sshd match
...(match_cfg_line_group(arg, line, user)) { + switch (match_cfg_line_group(arg, line, user, not)) { case -1: return -1; case 0: @@ -584,27 +602,30 @@ } else if (strcasecmp(attrib, "host") == 0) { if (!host) { result = 0; + not = 0; continue; } - if (match_hostname(host, arg, len) != 1) + if (match_hostname(host, arg, len) == not) result = 0; else - debug("connection from %.100s matched 'Host " - "%.100s' at line %d", host, arg, line); + debug("connection from %.100s matched '%sHost " +...
2006 Sep 25
2
Dovecot - postfix SASL
...tch: 67.183.127.210: no match Sep 25 04:53:30 hostyougood postfix/smtpd[17497]: match_list_match: c-67-183-127-210.hsd1.wa.comcast.net: no match Sep 25 04:53:30 hostyougood postfix/smtpd[17497]: match_list_match: 67.183.127.210: no match Sep 25 04:53:30 hostyougood postfix/smtpd[17497]: match_hostname: c-67-183-127-210.hsd1.wa.comcast.net ~? 127.0.0.0/8 Sep 25 04:53:30 hostyougood postfix/smtpd[17497]: match_hostaddr: 67.183.127.210 ~? 127.0.0.0/8 Sep 25 04:53:30 hostyougood postfix/smtpd[17497]: match_hostname: c-67-183-127-210.hsd1.wa.comcast.net ~? 205.252.250.12 Sep 25 04:53:...
2004 Feb 01
1
innetgr revised netgroup patch against 2.6.0
...section but didn't find it in my 15 seconds of looking.. --- access.c 2003-07-30 16:12:27.000000000 +1000 +++ ../rsync-2.6.0-Linux/access.c 2004-02-01 23:21:12.000000000 +1100 @@ -22,10 +22,21 @@ */ #include "rsync.h" +#include <netdb.h> static int match_hostname(char *host, char *tok) { + char *netgroup; + + if(strlen(tok)>1){ + if(tok[0]=='@'){ + netgroup=tok+1; + if(innetgr(netgroup, host, NULL, NULL)){ + return(1); + } +...
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 I wo...
2011 Feb 21
2
Rejected mails
...2]: generic_checks: name=reject_unauth_pipelining status=0 Feb 21 16:36:34 hostname postfix/smtpd[1372]: generic_checks: name=permit_mynetworks Feb 21 16:36:34 hostname postfix/smtpd[1372]: permit_mynetworks: gate1.mds.com.sg 203.126.130.157 Feb 21 16:36:34 hostname postfix/smtpd[1372]: match_hostname: gate1.mds.com.sg ~? 172.18.20.0/24 Feb 21 16:36:34 hostname postfix/smtpd[1372]: match_hostaddr: 203.126.130.157 ~? 172.18.20.0/24 Feb 21 16:36:34 hostname postfix/smtpd[1372]: match_hostname: gate1.mds.com.sg ~? 127.0.0.0/8 Feb 21 16:36:34 hostname postfix/smtpd[1372]: mat...
2019 Mar 28
2
dovecot mailing list stopped delivering mail
...7;smtpd[66648]: match_list_match: talvi.dovecot.org: no match Mar 28 10:57:42 dna01 postfix/smtpd[66648]: match_list_match: 94.237.25.159: no match Mar 28 10:57:42 dna01 postfix/smtpd[66648]: smtp_stream_setup: maxtime=300 enable_deadline=0 Mar 28 10:57:42 dna01 postfix/smtpd[66648]: match_hostname: smtpd_client_event_limit_exceptions: talvi.dovecot.org ~? 192.168.3.0/24 Mar 28 10:57:42 dna01 postfix/smtpd[66648]: match_hostaddr: smtpd_client_event_limit_exceptions: 94.237.25.159 ~? 192.168.3.0/24 Mar 28 10:57:42 dna01 postfix/smtpd[66648]: match_hostname: smtpd_client_even...
2017 Mar 03
2
case sensitive hostname matching
...dfa093883a5c4e91be3f72d99946b170 and eb6d870a0ea8661299bb2ea8f013d3ace04e2024). Given that hostnames are ususally interpreted in a case insensitive way (and the code actually expects the input to be lowercased anyway) it might be good to perform the comparisons as such. We can either make sure match_hostname() receives a lowercased string indeed or perform the lowercasing there (carefully as not to introduce side effects). One question is, whether *any* hostname matching should be case insensitive or whether originalhost is better left alone (I can think of reasons for case sensitive matching there...
2019 Mar 28
0
dovecot mailing list stopped delivering mail
...match: > talvi.dovecot.org: no match > Mar 28 10:57:42 dna01 postfix/smtpd[66648]: match_list_match: > 94.237.25.159: no match > Mar 28 10:57:42 dna01 postfix/smtpd[66648]: smtp_stream_setup: > maxtime=300 enable_deadline=0 > Mar 28 10:57:42 dna01 postfix/smtpd[66648]: match_hostname: > smtpd_client_event_limit_exceptions: talvi.dovecot.org ~? 192.168.3.0/24 > Mar 28 10:57:42 dna01 postfix/smtpd[66648]: match_hostaddr: > smtpd_client_event_limit_exceptions: 94.237.25.159 ~? 192.168.3.0/24 > Mar 28 10:57:42 dna01 postfix/smtpd[66648]: match_hostname:...
2000 Feb 27
0
[PATCH] Fix login.conf, expiration, BSD compatibility in OpenSSH
...e()); } + +#ifdef LOGIN_CAP + lc = login_getpwclass(pw); + if (lc == NULL) + lc = login_getclassbyname(NULL, pw); + from_host = get_canonical_hostname(); + from_ip = get_remote_ipaddr(); + + denied = 0; + if ((hosts = login_getcapstr(lc, "host.deny", NULL, NULL)) != NULL) { + denied = match_hostname(from_host, hosts, strlen(hosts)); + if (!denied) + denied = match_hostname(from_ip, hosts, strlen(hosts)); + } + if (!denied && + (hosts = login_getcapstr(lc, "host.allow", NULL, NULL)) != NULL) { + denied = !match_hostname(from_host, hosts, strlen(hosts)); + if (denied)...
2003 Mar 04
0
hashing known_hosts
....c Mon Mar 3 17:28:25 2003 @@ -135,8 +135,13 @@ check_host_in_hostfile(const char *filen ; /* Check if the host name matches. */ +#ifdef HASH_KNOWN_HOSTS + if (match_hashed_hostname(host, cp, (u_int) (cp2 - cp)) != 1) + continue; +#else if (match_hostname(host, cp, (u_int) (cp2 - cp)) != 1) continue; +#endif /* Got a match. Skip host name. */ cp = cp2; diff -u -p openssh-3.4p1/match.c openssh-3.4p1-hash/match.c --- openssh-3.4p1/match.c Mon Mar 4 20:42:43 2002 +++ openssh-3.4p1-hash/match.c Mon Mar 3 17:32:17 2...
2012 Dec 27
4
Help Getting Postfix relaying via Gmail
...ys=20/0.04/3.3/0, dsn=4.7.0, status=deferred (SASL authentication failed; cannot authenticate to server smtp.gmail.com[173.194.79.108]: no mechanism available) Dec 27 23:15:40 hbc postfix/smtp[2605]: flush_add: site gmail.com id 8DEB1410B3 Dec 27 23:15:40 hbc postfix/smtp[2605]: match_hostname: gmail.com ~? hbc.hillcrest.org.nz Dec 27 23:15:40 hbc postfix/smtp[2605]: match_hostname: gmail.com ~? localhost.hillcrest.org.nz Dec 27 23:15:40 hbc postfix/smtp[2605]: match_hostname: gmail.com ~? localhost Dec 27 23:15:40 hbc postfix/smtp[2605]: match_list_match: gmail.com: no match...
2001 Sep 28
0
openssh-2.9.9p2 subscript violation problems with ctype macros
...ther than isdigit(X), as it's faster on most modern hosts (a subtract and a compare, rather than a reference through memory and then a test). 2001-09-28 Paul Eggert <eggert at twinsun.com> * canohost.c (get_remote_hostname): Don't pass negative chars to ctype macros. * match.c (match_hostname): Likewise. * openbsd-compat/base64.c (b64_ntop): Likewise. * openbsd-compat/inet_aton.c (inet_aton): Likewise. * openbsd-compat/mktemp.c (_gettemp): Likewise. * openbsd-compat/readpassphrase.c (readpassphrase): Likewise. * scp.c (sink): Likewise. * sshconnect.c (sshconnect.c)...
2012 Dec 27
3
[PATCH] hostfile: list known names (if any) for new hostkeys
...ne), &linenum) == 0) { cp = line; @@ -269,11 +266,11 @@ load_hostkeys(struct hostkeys *hostkeys, const char *host, const char *path) for (cp2 = cp; *cp2 && *cp2 != ' ' && *cp2 != '\t'; cp2++) ; - /* Check if the host name matches. */ - if (match_hostname(host, cp, (u_int) (cp2 - cp)) != 1) { + /* Check if the host name matches if we're looking for a host. */ + if (lookup_host && match_hostname(lookup_host, cp, (u_int) (cp2 - cp)) != 1) { if (*cp != HASH_DELIM) continue; - hashed_host = host_hash(host, cp, (u_int) (c...
2019 Feb 22
3
[PATCH 2/2] Cygwin: implement case-insensitive Unicode user and group name matching
On Wed, 20 Feb 2019 at 23:54, Corinna Vinschen <vinschen at redhat.com> wrote: > The previous revert enabled case-insensitive user names again. This > patch implements the case-insensitive user and group name matching. > To allow Unicode chars, implement the matcher using wchar_t chars in > Cygwin-specific code. Keep the generic code changes as small as possible. > Cygwin:
2002 May 07
0
Fixing exclude/exclude wildcard handling
...t.o lib/snprintf.o lib/mdfour.o \ lib/permstring.o \ @LIBOBJS@ ZLIBOBJ=zlib/deflate.o zlib/infblock.o zlib/infcodes.o zlib/inffast.o \ Index: access.c --- access.c 2002/04/11 02:25:53 1.5 +++ access.c 2002/05/08 04:19:50 @@ -27,7 +27,7 @@ static int match_hostname(char *host, char *tok) { if (!host || !*host) return 0; - return (fnmatch(tok, host, 0) == 0); + return wildmat(host, tok); } Index: authenticate.c --- authenticate.c 2002/01/24 02:33:45 1.19 +++ authenticate.c 2002/05/08 04:19:50 @@ -239,7 +239,7 @@ if (!users) return NUL...
2006 Mar 29
7
sshd config parser
Hi All. For various reasons, we're currently looking at extending (or even overhauling) the config parser used for sshd_config. Right now the syntax I'm looking at is a cumulative "Match" keyword that matches when all of the specified criteria are met. This would be similar the the Host directive used in ssh_config, although it's still limiting (eg you can't easily
1999 Nov 22
3
status of openssh for solaris?
In message <19991122110826.A23851 at wdawson-sun.sbs.siemens.com>, Willard Dawson writes: >I just tried to compile, this time with openssh-1.2pre14, openssl-0.9.4 >and egd-0.6. I get considerably further along, but still not completely >compiled. Here are the last bits: > >gcc -g -O2 -Wall -I/usr/local/ssl/include
2019 Feb 22
2
[PATCH 2/2] Cygwin: implement case-insensitive Unicode user and group name matching
...#47;match.h b/match.h index 852b1a5cb164..d98b0cb87719 100644 --- a/match.h +++ b/match.h @@ -16,6 +16,7 @@ int match_pattern(const char *, const char *); int match_pattern_list(const char *, const char *, int); +int match_usergroup_pattern_list(const char *, const char *); int match_hostname(const char *, const char *); int match_host_and_ip(const char *, const char *, const char *); int match_user(const char *, const char *, const char *, const char *); diff --git a/openbsd-compat/bsd-cygwin_util.c b/openbsd-compat/bsd-cygwin_util.c index f721fca9d998..1e4cdc9280d4...
2005 Jan 20
0
AllowUsers - proposal for useful variations on the theme
...rig/match.h 2002-03-05 01:42:43.000000000 +0000 +++ openssh-3.9p1.jpmg/match.h 2005-01-20 10:11:24.691070340 +0000 @@ -14,11 +14,12 @@ #ifndef MATCH_H #define MATCH_H int match_pattern(const char *, const char *); int match_pattern_list(const char *, const char *, u_int, int); int match_hostname(const char *, const char *, u_int); int match_host_and_ip(const char *, const char *, const char *); int match_user(const char *, const char *, const char *, const char *); +int match_user_fixedname(const char *, const char *, const char *); char *match_list(const char *, const char *, u_...
2013 Mar 14
8
Question regarding Postfix and Dovecot
...atch_list_match: mail-ve0-f174.google.com: no match Mar 13 20:23:55 andromeda postfix/smtpd[15316]: match_list_match: 209.85.128.174: no match Mar 13 20:23:55 andromeda postfix/smtpd[15316]: smtp_stream_setup: maxtime=300 enable_deadline=0 Mar 13 20:23:55 andromeda postfix/smtpd[15316]: match_hostname: mail-ve0-f174.google.com ~? 127.0.0.0/8 Mar 13 20:23:55 andromeda postfix/smtpd[15316]: match_hostaddr: 209.85.128.174 ~? 127.0.0.0/8 Mar 13 20:23:55 andromeda postfix/smtpd[15316]: match_list_match: mail-ve0-f174.google.com: no match Mar 13 20:23:55 andromeda postfix/smtpd[153...