diff options
author | 2012-10-11 21:14:32 +0000 | |
---|---|---|
committer | 2012-10-11 21:14:32 +0000 | |
commit | 526560bf8ef5c4caea7b372e683b4acae111b5c2 (patch) | |
tree | 174679a5ea2c64eb55e10b873804b86e03d720f9 | |
parent | do not attempt a hardware list - it is currently out of date to the point (diff) | |
download | wireguard-openbsd-526560bf8ef5c4caea7b372e683b4acae111b5c2.tar.xz wireguard-openbsd-526560bf8ef5c4caea7b372e683b4acae111b5c2.zip |
- replace "from all" and "for all" with "from any" and "for any"
ok eric@, chl@
-rw-r--r-- | usr.sbin/smtpd/lka_session.c | 4 | ||||
-rw-r--r-- | usr.sbin/smtpd/parse.y | 20 | ||||
-rw-r--r-- | usr.sbin/smtpd/ruleset.c | 8 | ||||
-rw-r--r-- | usr.sbin/smtpd/smtpd.conf.5 | 14 | ||||
-rw-r--r-- | usr.sbin/smtpd/smtpd.h | 8 |
5 files changed, 27 insertions, 27 deletions
diff --git a/usr.sbin/smtpd/lka_session.c b/usr.sbin/smtpd/lka_session.c index beee051f798..a030ede1a35 100644 --- a/usr.sbin/smtpd/lka_session.c +++ b/usr.sbin/smtpd/lka_session.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lka_session.c,v 1.42 2012/10/10 18:02:37 eric Exp $ */ +/* $OpenBSD: lka_session.c,v 1.43 2012/10/11 21:14:32 gilles Exp $ */ /* * Copyright (c) 2011 Gilles Chehade <gilles@openbsd.org> @@ -228,7 +228,7 @@ lka_expand(struct lka_session *lks, struct rule *rule, struct expandnode *xn) if (rule->r_action == A_RELAY || rule->r_action == A_RELAYVIA) { lka_submit(lks, rule, xn); } - else if (rule->r_condition.c_type == C_VDOM) { + else if (rule->r_condition.c_type == COND_VDOM) { /* expand */ lks->expand.rule = rule; lks->expand.parent = xn; diff --git a/usr.sbin/smtpd/parse.y b/usr.sbin/smtpd/parse.y index 2ee255d3134..c71f3f392e0 100644 --- a/usr.sbin/smtpd/parse.y +++ b/usr.sbin/smtpd/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.107 2012/10/09 20:33:02 gilles Exp $ */ +/* $OpenBSD: parse.y,v 1.108 2012/10/11 21:14:32 gilles Exp $ */ /* * Copyright (c) 2008 Gilles Chehade <gilles@openbsd.org> @@ -119,7 +119,7 @@ typedef struct { %} -%token AS QUEUE COMPRESSION CIPHER INTERVAL SIZE LISTEN ON ALL PORT EXPIRE +%token AS QUEUE COMPRESSION CIPHER INTERVAL SIZE LISTEN ON ANY PORT EXPIRE %token MAP HASH LIST SINGLE SSL SMTPS CERTIFICATE ENCRYPTION %token DB LDAP PLAIN DOMAIN SOURCE %token RELAY BACKUP VIA DELIVER TO MAILDIR MBOX HOSTNAME @@ -553,7 +553,7 @@ condition : DOMAIN mapref alias { } c = xcalloc(1, sizeof *c, "parse condition: DOMAIN"); - c->c_type = C_DOM; + c->c_type = COND_DOM; c->c_map = $2; $$ = c; } @@ -568,7 +568,7 @@ condition : DOMAIN mapref alias { } c = xcalloc(1, sizeof *c, "parse condition: VIRTUAL"); - c->c_type = C_VDOM; + c->c_type = COND_VDOM; c->c_map = $2; $$ = c; } @@ -596,17 +596,17 @@ condition : DOMAIN mapref alias { map_add(m, hostname, NULL); c = xcalloc(1, sizeof *c, "parse condition: LOCAL"); - c->c_type = C_DOM; + c->c_type = COND_DOM; c->c_map = m->m_id; $$ = c; } - | ALL alias { + | ANY alias { struct cond *c; struct map *m; - c = xcalloc(1, sizeof *c, "parse condition: ALL"); - c->c_type = C_ALL; + c = xcalloc(1, sizeof *c, "parse condition: ANY"); + c->c_type = COND_ANY; if ($2) { if ((m = map_findbyname($2)) == NULL) { @@ -792,7 +792,7 @@ action : DELIVER TO MAILDIR { from : FROM mapref { $$ = $2; } - | FROM ALL { + | FROM ANY { $$ = map_findbyname("<anyhost>")->m_id; } | FROM LOCAL { @@ -937,7 +937,7 @@ lookup(char *s) static const struct keywords keywords[] = { { "accept", ACCEPT }, { "alias", ALIAS }, - { "all", ALL }, + { "any", ANY }, { "as", AS }, { "auth", AUTH }, { "auth-optional", AUTH_OPTIONAL }, diff --git a/usr.sbin/smtpd/ruleset.c b/usr.sbin/smtpd/ruleset.c index 8bd96dc914f..2e9161bc38b 100644 --- a/usr.sbin/smtpd/ruleset.c +++ b/usr.sbin/smtpd/ruleset.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ruleset.c,v 1.23 2012/09/21 10:22:29 eric Exp $ */ +/* $OpenBSD: ruleset.c,v 1.24 2012/10/11 21:14:32 gilles Exp $ */ /* * Copyright (c) 2009 Gilles Chehade <gilles@openbsd.org> @@ -61,10 +61,10 @@ ruleset_match(const struct envelope *evp) ! ruleset_check_source(r->r_sources, ss))) continue; - if (r->r_condition.c_type == C_ALL) + if (r->r_condition.c_type == COND_ANY) return r; - if (r->r_condition.c_type == C_DOM) { + if (r->r_condition.c_type == COND_DOM) { map = map_find(r->r_condition.c_map); if (map == NULL) fatal("failed to lookup map."); @@ -82,7 +82,7 @@ ruleset_match(const struct envelope *evp) } } - if (r->r_condition.c_type == C_VDOM) { + if (r->r_condition.c_type == COND_VDOM) { if (aliases_vdomain_exists(r->r_condition.c_map, maddr->domain)) return r; diff --git a/usr.sbin/smtpd/smtpd.conf.5 b/usr.sbin/smtpd/smtpd.conf.5 index b3e01b3e57b..e6ca6f8d555 100644 --- a/usr.sbin/smtpd/smtpd.conf.5 +++ b/usr.sbin/smtpd/smtpd.conf.5 @@ -1,4 +1,4 @@ -.\" $OpenBSD: smtpd.conf.5,v 1.73 2012/10/10 06:02:26 jmc Exp $ +.\" $OpenBSD: smtpd.conf.5,v 1.74 2012/10/11 21:14:32 gilles Exp $ .\" .\" Copyright (c) 2008 Janne Johansson <jj@openbsd.org> .\" Copyright (c) 2009 Jacek Masiulaniec <jacekm@dobremiasto.net> @@ -16,7 +16,7 @@ .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" .\" -.Dd $Mdocdate: October 10 2012 $ +.Dd $Mdocdate: October 11 2012 $ .Dt SMTPD.CONF 5 .Os .Sh NAME @@ -234,7 +234,7 @@ the default action is to reject the message. Following the accept/reject decision comes the client's IP address filter: .Bl -tag -width Ds -.It Ic from all +.It Ic from any Make the rule match regardless of the IP of connecting client. .It Ic from local The rule matches only locally originating connections. @@ -249,7 +249,7 @@ specified in CIDR notation. Next comes the selection based on the domain the message is sent to: .Bl -tag -width Ds .It Xo -.Ic for all +.Ic for any .Op Ic alias Ar aliases .Xc Make the rule match regardless of the domain it is sent to. @@ -459,7 +459,7 @@ listen on lo0 map aliases source db "/etc/mail/aliases.db" map secrets source db "/etc/mail/secrets.db" accept for local alias aliases deliver to mbox -accept for all relay via tls+auth://smtp.example.com auth secrets +accept for any relay via tls+auth://smtp.example.com auth secrets .Ed .Pp In this second example, @@ -484,9 +484,9 @@ listen on lo0 listen on egress tls certificate mail.example.com auth map aliases source db "/etc/mail/aliases.db" accept for local deliver to mda "/path/to/mda -f -" -accept from all for domain example.org \e +accept from any for domain example.org \e deliver to mda "/path/to/mda -f -" -accept for all relay +accept for any relay .Ed .Sh SEE ALSO .Xr mailer.conf 5 , diff --git a/usr.sbin/smtpd/smtpd.h b/usr.sbin/smtpd/smtpd.h index a24c62af654..dd5c8f9f409 100644 --- a/usr.sbin/smtpd/smtpd.h +++ b/usr.sbin/smtpd/smtpd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: smtpd.h,v 1.385 2012/10/10 20:29:46 gilles Exp $ */ +/* $OpenBSD: smtpd.h,v 1.386 2012/10/11 21:14:32 gilles Exp $ */ /* * Copyright (c) 2008 Gilles Chehade <gilles@openbsd.org> @@ -278,9 +278,9 @@ struct map_backend { enum cond_type { - C_ALL, - C_DOM, - C_VDOM + COND_ANY, + COND_DOM, + COND_VDOM }; struct cond { |