/*
- *
- * match.c
- *
* Author: Tatu Ylonen <ylo@cs.hut.fi>
- *
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
* All rights reserved
- *
- * Created: Thu Jun 22 01:17:50 1995 ylo
- *
* Simple pattern matching, with '*' and '?' as wildcards.
*
+ * As far as I am concerned, the code I have written for this software
+ * can be used freely for any purpose. Any derived versions of this
+ * software must be clearly marked as such, and if the derived work is
+ * incompatible with the protocol description in the RFC file, it must be
+ * called by a name other than "ssh" or "Secure Shell".
*/
#include "includes.h"
-RCSID("$OpenBSD: match.c,v 1.8 2000/06/20 01:39:42 markus Exp $");
+RCSID("$OpenBSD: match.c,v 1.11 2001/01/21 19:05:52 markus Exp $");
-#include "ssh.h"
+#include "match.h"
/*
* Returns true if the given string matches the pattern (which may contain ?
*/
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];
int negated;
int got_positive;
- unsigned int i, subi;
+ u_int i, subi;
got_positive = 0;
for (i = 0; i < len;) {