diff options
author | Gilles Chehade <gilles@poolp.org> | 2012-11-15 18:35:53 +0100 |
---|---|---|
committer | Gilles Chehade <gilles@poolp.org> | 2012-11-15 18:35:53 +0100 |
commit | ead5ab3bf6012cc8cb5cbbe45e86acfcac126f57 (patch) | |
tree | f9cefe3e2a346712ef1f15c4562a4cb9bdcc722e | |
parent | cosmethic (diff) | |
download | OpenSMTPD-ead5ab3bf6012cc8cb5cbbe45e86acfcac126f57.tar.xz OpenSMTPD-ead5ab3bf6012cc8cb5cbbe45e86acfcac126f57.zip |
tweak syntax slightly to provide simpler semantic for backend/paths
combinations
-rw-r--r-- | smtpd/parse.y | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/smtpd/parse.y b/smtpd/parse.y index b3d9b883..e4d85494 100644 --- a/smtpd/parse.y +++ b/smtpd/parse.y @@ -420,10 +420,11 @@ table : TABLE STRING STRING { p = $3; if (*p == '/') { backend = "static"; - config = $3; + config = $3; } else { - p = backend = config = NULL; + backend = $3; + config = NULL; for (p = $3; *p && *p != ':'; p++) ; if (*p == ':') { @@ -432,8 +433,8 @@ table : TABLE STRING STRING { config = p+1; } } - if (config == NULL || *config != '/') { - yyerror("table parameter must be absolute path"); + if (config != NULL && *config != '/') { + yyerror("backend parameter must be an absolute path"); free($2); free($3); YYERROR; |