diff options
Diffstat (limited to '')
-rw-r--r-- | src/grammar.y | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/grammar.y b/src/grammar.y index a9953b4..526bf7b 100644 --- a/src/grammar.y +++ b/src/grammar.y @@ -1,4 +1,4 @@ -/* $Id: grammar.y,v 1.14 2002-06-06 20:26:13 rjkaes Exp $ +/* $Id: grammar.y,v 1.15 2002-06-07 18:29:40 rjkaes Exp $ * * This is the grammar for tinyproxy's configuration file. It needs to be * in sync with scanner.l. If you know more about yacc and lex than I do @@ -24,6 +24,7 @@ #include "acl.h" #include "anonymous.h" #include "child.h" +#include "filter.h" #include "log.h" #include "reqs.h" @@ -46,7 +47,7 @@ int yylex(void); %token KW_TIMEOUT %token KW_USER KW_GROUP %token KW_ANONYMOUS KW_XTINYPROXY -%token KW_FILTER KW_FILTERURLS KW_FILTEREXTENDED +%token KW_FILTER KW_FILTERURLS KW_FILTEREXTENDED KW_FILTER_DEFAULT_DENY %token KW_TUNNEL KW_UPSTREAM %token KW_CONNECTPORT KW_BIND %token KW_ALLOW KW_DENY @@ -134,6 +135,15 @@ statement log_message(LOG_WARNING, "Filter support was not compiled in."); #endif } + | KW_FILTER_DEFAULT_DENY yesno + { +#ifdef FILTER_ENABLE + if ($2) + filter_set_default_policy(FILTER_DEFAULT_DENY); +#else + log_message(LOG_WARNING, "FIlter support was not compiled in."); +#endif + } | KW_XTINYPROXY network_address { #ifdef XTINYPROXY_ENABLE |