summaryrefslogtreecommitdiff
path: root/match.c
diff options
context:
space:
mode:
authormouring <mouring>2002-03-05 01:35:23 +0000
committermouring <mouring>2002-03-05 01:35:23 +0000
commitf5860939499aec0fa65554d6d556dc646dbf3762 (patch)
tree73e988a3db278fabec3bc250d3d12323e270f436 /match.c
parentdb05553aab7e33ad8ad073bd312e9fac2ff0a546 (diff)
downloadopenssh-f5860939499aec0fa65554d6d556dc646dbf3762.tar.gz
- stevesk@cvs.openbsd.org 2002/02/28 19:36:28
[auth.c match.c match.h] delay hostname lookup until we see a ``@'' in DenyUsers and AllowUsers for sshd -u0; ok markus@
Diffstat (limited to 'match.c')
-rw-r--r--match.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/match.c b/match.c
index c82c28a8..e73ed2aa 100644
--- a/match.c
+++ b/match.c
@@ -35,9 +35,10 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: match.c,v 1.17 2002/02/11 16:21:42 markus Exp $");
+RCSID("$OpenBSD: match.c,v 1.18 2002/02/28 19:36:28 stevesk Exp $");
#include "match.h"
+#include "canohost.h"
#include "xmalloc.h"
/*
@@ -202,7 +203,7 @@ match_host_and_ip(const char *host, const char *ipaddr,
* match user, user@host_or_ip, user@host_or_ip_list against pattern
*/
int
-match_user(const char *user, const char *host, const char *ipaddr,
+match_user(const char *user, int verify_reverse_mapping,
const char *pattern)
{
char *p, *pat;
@@ -216,7 +217,9 @@ match_user(const char *user, const char *host, const char *ipaddr,
*p++ = '\0';
if ((ret = match_pattern(user, pat)) == 1)
- ret = match_host_and_ip(host, ipaddr, p);
+ ret = match_host_and_ip(
+ get_canonical_hostname(verify_reverse_mapping),
+ get_remote_ipaddr(), p);
xfree(pat);
return ret;