.\" SUCH DAMAGE.
.\"
.\" from: @(#)syslog.conf.5 8.1 (Berkeley) 6/9/93
-.\" $OpenBSD: syslog.conf.5,v 1.36 2018/02/02 10:53:44 jmc Exp $
+.\" $OpenBSD: syslog.conf.5,v 1.37 2018/07/17 13:51:47 djm Exp $
.\" $NetBSD: syslog.conf.5,v 1.4 1996/01/02 17:41:46 perry Exp $
.\"
-.Dd $Mdocdate: February 2 2018 $
+.Dd $Mdocdate: July 17 2018 $
.Dt SYSLOG.CONF 5
.Os
.Sh NAME
The tag is a line beginning with
.Em !prog
and each block will be associated with calls to syslog from that specific
-program.
+program (matched using shell globbing rules).
When a message matches multiple blocks, the action of each matching
block is taken.
If no tag is specified at the beginning of the file,
-/* $OpenBSD: syslogd.c,v 1.254 2017/11/24 23:11:42 bluhm Exp $ */
+/* $OpenBSD: syslogd.c,v 1.255 2018/07/17 13:51:47 djm Exp $ */
/*
* Copyright (c) 2014-2017 Alexander Bluhm <bluhm@genua.de>
#include <errno.h>
#include <event.h>
#include <fcntl.h>
+#include <fnmatch.h>
#include <limits.h>
#include <paths.h>
#include <signal.h>
continue;
/* skip messages with the incorrect program or hostname */
- if (f->f_program && strcmp(prog, f->f_program) != 0)
+ if (f->f_program && fnmatch(f->f_program, prog, 0) != 0)
continue;
- if (f->f_hostname && strcmp(from, f->f_hostname) != 0)
+ if (f->f_hostname && fnmatch(f->f_hostname, from, 0) != 0)
continue;
if (f->f_type == F_CONSOLE && (flags & IGN_CONS))