summaryrefslogtreecommitdiff
path: root/usr.sbin/smtpd/parse.y
diff options
context:
space:
mode:
authorEric Faurot <eric@cvs.openbsd.org>2011-10-23 15:36:54 +0000
committerEric Faurot <eric@cvs.openbsd.org>2011-10-23 15:36:54 +0000
commit7f7be081eacbf7bde7d297431b93f8a70307274c (patch)
tree1318a19a0492576bf87c65e3a34fd1606f702175 /usr.sbin/smtpd/parse.y
parentbd0c81af7c32d9f797ee6cefca04399f7335d4d4 (diff)
a few important fixes:
- use correct endianness when dumping/loading port - use the right flag set when dumping/loading flags - keep and use the authmap name when needed, rather than an id that might change when smtpd is restarted - dump/load the authmap name with the envelope - remove the rule struct from rq_batch as only the relay info is useful ok gilles@
Diffstat (limited to 'usr.sbin/smtpd/parse.y')
-rw-r--r--usr.sbin/smtpd/parse.y13
1 files changed, 7 insertions, 6 deletions
diff --git a/usr.sbin/smtpd/parse.y b/usr.sbin/smtpd/parse.y
index 5846b4e9f3f..96676ead15c 100644
--- a/usr.sbin/smtpd/parse.y
+++ b/usr.sbin/smtpd/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.80 2011/09/01 16:23:33 chl Exp $ */
+/* $OpenBSD: parse.y,v 1.81 2011/10/23 15:36:53 eric Exp $ */
/*
* Copyright (c) 2008 Gilles Chehade <gilles@openbsd.org>
@@ -128,12 +128,12 @@ typedef struct {
%token <v.string> STRING
%token <v.number> NUMBER
%type <v.map> map
-%type <v.number> quantifier decision port from auth ssl size expire credentials
+%type <v.number> quantifier decision port from auth ssl size expire
%type <v.cond> condition
%type <v.tv> interval
%type <v.object> mapref
%type <v.maddr> relay_as
-%type <v.string> certname user tag on alias
+%type <v.string> certname user tag on alias credentials
%%
@@ -291,8 +291,7 @@ credentials : AUTH STRING {
free($2);
YYERROR;
}
- free($2);
- $$ = m->m_id;
+ $$ = $2;
}
| /* empty */ { $$ = 0; }
;
@@ -1022,7 +1021,9 @@ action : DELIVER TO MAILDIR user {
if ($7) {
rule->r_value.relayhost.flags |= F_AUTH;
- rule->r_value.relayhost.secmapid = $7;
+ strlcpy(rule->r_value.relayhost.authmap, $7,
+ sizeof(rule->r_value.relayhost.authmap));
+ free($7);
}
if ($6 != NULL) {