summaryrefslogtreecommitdiff
path: root/usr.sbin/smtpd/parse.y
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/smtpd/parse.y')
-rw-r--r--usr.sbin/smtpd/parse.y11
1 files changed, 10 insertions, 1 deletions
diff --git a/usr.sbin/smtpd/parse.y b/usr.sbin/smtpd/parse.y
index ac4835a1d4f..8bbcdd47d05 100644
--- a/usr.sbin/smtpd/parse.y
+++ b/usr.sbin/smtpd/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.15 2008/12/06 14:23:47 jacekm Exp $ */
+/* $OpenBSD: parse.y,v 1.16 2008/12/10 23:04:24 jacekm Exp $ */
/*
* Copyright (c) 2008 Gilles Chehade <gilles@openbsd.org>
@@ -349,6 +349,15 @@ map : MAP STRING {
map = NULL;
YYERROR;
}
+ if (strcmp(map->m_name, "aliases") == 0 ||
+ strcmp(map->m_name, "virtual") == 0) {
+ if (map->m_src != S_DB) {
+ yyerror("map source must be db");
+ free(map);
+ map = NULL;
+ YYERROR;
+ }
+ }
TAILQ_INSERT_TAIL(conf->sc_maps, map, m_entry);
map = NULL;
}