Return to match.c CVS log | Up to [local] / src / usr.bin / ssh |
version 1.6.2.3, 2000/11/08 21:30:56 | version 1.6.2.4, 2001/03/12 15:44:12 | ||
---|---|---|---|
|
|
||
#include "includes.h" | #include "includes.h" | ||
RCSID("$OpenBSD$"); | RCSID("$OpenBSD$"); | ||
#include "ssh.h" | #include "match.h" | ||
/* | /* | ||
* Returns true if the given string matches the pattern (which may contain ? | * Returns true if the given string matches the pattern (which may contain ? | ||
|
|
||
*/ | */ | ||
int | int | ||
match_hostname(const char *host, const char *pattern, unsigned int len) | match_hostname(const char *host, const char *pattern, u_int len) | ||
{ | { | ||
char sub[1024]; | char sub[1024]; | ||
int negated; | int negated; | ||
int got_positive; | int got_positive; | ||
unsigned int i, subi; | u_int i, subi; | ||
got_positive = 0; | got_positive = 0; | ||
for (i = 0; i < len;) { | for (i = 0; i < len;) { |