summaryrefslogtreecommitdiff
path: root/match.c
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2002-03-05 01:35:23 +0000
committerBen Lindstrom <mouring@eviladmin.org>2002-03-05 01:35:23 +0000
commit916d83d208d751b9a3605165893370c8d429bba5 (patch)
tree70ccdcb0c4060a4f0ca6a5170a63f517cf1f2638 /match.c
parent80cb27dd7c7caa07615bf375a3bd090085f2d33d (diff)
- 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 c82c28a8b..e73ed2aa2 100644
--- a/match.c
+++ b/match.c
@@ -35,9 +35,10 @@
35 */ 35 */
36 36
37#include "includes.h" 37#include "includes.h"
38RCSID("$OpenBSD: match.c,v 1.17 2002/02/11 16:21:42 markus Exp $"); 38RCSID("$OpenBSD: match.c,v 1.18 2002/02/28 19:36:28 stevesk Exp $");
39 39
40#include "match.h" 40#include "match.h"
41#include "canohost.h"
41#include "xmalloc.h" 42#include "xmalloc.h"
42 43
43/* 44/*
@@ -202,7 +203,7 @@ match_host_and_ip(const char *host, const char *ipaddr,
202 * match user, user@host_or_ip, user@host_or_ip_list against pattern 203 * match user, user@host_or_ip, user@host_or_ip_list against pattern
203 */ 204 */
204int 205int
205match_user(const char *user, const char *host, const char *ipaddr, 206match_user(const char *user, int verify_reverse_mapping,
206 const char *pattern) 207 const char *pattern)
207{ 208{
208 char *p, *pat; 209 char *p, *pat;
@@ -216,7 +217,9 @@ match_user(const char *user, const char *host, const char *ipaddr,
216 *p++ = '\0'; 217 *p++ = '\0';
217 218
218 if ((ret = match_pattern(user, pat)) == 1) 219 if ((ret = match_pattern(user, pat)) == 1)
219 ret = match_host_and_ip(host, ipaddr, p); 220 ret = match_host_and_ip(
221 get_canonical_hostname(verify_reverse_mapping),
222 get_remote_ipaddr(), p);
220 xfree(pat); 223 xfree(pat);
221 224
222 return ret; 225 return ret;