summaryrefslogtreecommitdiff
path: root/match.h
diff options
context:
space:
mode:
authordamien <damien>2000-03-26 03:04:51 +0000
committerdamien <damien>2000-03-26 03:04:51 +0000
commit0813e8a392fe6cc7661f108485177667bee6caeb (patch)
tree86feb4fbcd3b25e30d71d6b7ce6cba052d7dd2dc /match.h
parentc9b20e2dd02ca0f34ae5cf25e3e0058408b58298 (diff)
downloadopenssh-0813e8a392fe6cc7661f108485177667bee6caeb.tar.gz
- OpenBSD CVS update
- [auth-krb4.c] -Wall - [auth-rh-rsa.c auth-rsa.c hostfile.c hostfile.h key.c key.h match.c] [match.h ssh.c ssh.h sshconnect.c sshd.c] initial support for DSA keys. ok deraadt@, niels@ - [cipher.c cipher.h] remove unused cipher_attack_detected code - [scp.1 ssh-add.1 ssh-agent.1 ssh-keygen.1 ssh.1 sshd.8] Fix some formatting problems I missed before. - [ssh.1 sshd.8] fix spelling errors, From: FreeBSD - [ssh.c] switch to raw mode only if he _get_ a pty (not if we _want_ a pty).
Diffstat (limited to 'match.h')
-rw-r--r--match.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/match.h b/match.h
new file mode 100644
index 00000000..4625d976
--- /dev/null
+++ b/match.h
@@ -0,0 +1,18 @@
+#ifndef MATCH_H
+#define MATCH_H
+
+/*
+ * Returns true if the given string matches the pattern (which may contain ?
+ * and * as wildcards), and zero if it does not match.
+ */
+int match_pattern(const char *s, const char *pattern);
+
+/*
+ * Tries to match the host name (which must be in all lowercase) against the
+ * comma-separated sequence of subpatterns (each possibly preceded by ! to
+ * indicate negation). Returns true if there is a positive match; zero
+ * otherwise.
+ */
+int match_hostname(const char *host, const char *pattern, unsigned int len);
+
+#endif