From d2a88ab3b0308a674c3609dab5a1c649a213d4b6 Mon Sep 17 00:00:00 2001 From: Reyk Floeter Date: Mon, 8 Jan 2007 20:46:19 +0000 Subject: do NOT use the regexp interface. it is way to complicated, error-prone and we don't know about all the possible security problems. change the check send/expect code to use the fnmatch(3) interface using shell globbing rules instead. this allows simple patterns like "220 * ESMTP*" or "SSH-[12].??-*". suggested by deraadt@ and otto@ ok Pierre-Yves Ritschard (pyr at spootnik dot org) --- usr.sbin/hoststated/hoststated.conf.5 | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'usr.sbin/hoststated/hoststated.conf.5') diff --git a/usr.sbin/hoststated/hoststated.conf.5 b/usr.sbin/hoststated/hoststated.conf.5 index 968fda45034..7d739ef3e52 100644 --- a/usr.sbin/hoststated/hoststated.conf.5 +++ b/usr.sbin/hoststated/hoststated.conf.5 @@ -1,4 +1,4 @@ -.\" $OpenBSD: hoststated.conf.5,v 1.11 2007/01/08 17:52:27 reyk Exp $ +.\" $OpenBSD: hoststated.conf.5,v 1.12 2007/01/08 20:46:18 reyk Exp $ .\" .\" Copyright (c) 2006 Pierre-Yves Ritschard .\" @@ -129,13 +129,14 @@ a9993e36476816aba3e25717850c26c9cd0d89d Ping hosts in this table to determine whether they are up or not. This method will automatically use ICMP or ICMPV6 depending on the address family of each host. -.It Ic check send Ar data Ic expect Ar regexp +.It Ic check send Ar data Ic expect Ar pattern For each host in the table, a TCP connection is established on the port specified, then .Ar data is sent. Incoming data is then read and is expected to match against -.Ar regexp. +.Ar pattern +using shell globbing rules. If .Ar data is an empty string or @@ -216,8 +217,6 @@ which load balances four hosts and falls back to one host containing a .Dq sorry page : .Bd -literal -offset indent -## -## www1=front-www1.private.example.com www2=front-www2.private.example.com www3=front-www3.private.example.com -- cgit v1.2.3