From 9630aae0061ae3fc1f4fe9c82ca055610d1cf073 Mon Sep 17 00:00:00 2001 From: hpa Date: Thu, 23 Sep 2004 02:22:02 +0000 Subject: [PATCH] Correct bug which caused "r" rules to get incorrectly rejected as "ri" rules --- CHANGES | 5 +++++ tftpd/remap.c | 3 ++- version | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index 71e93f1..8d0cd03 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,10 @@ $Id$ +Changes in 0.40: + Fix bug which would cause "r" remapping rules to be + incorrectly rejected. + + Changes in 0.39: Support Perl-style \U...\E and \L...\E, as well as allow matching rules to be inverted (execute if rule *doesn't* diff --git a/tftpd/remap.c b/tftpd/remap.c index 229ece5..3fa0fc0 100644 --- a/tftpd/remap.c +++ b/tftpd/remap.c @@ -234,7 +234,8 @@ static int parseline(char *line, struct rule *r, int lineno) if ( !(r->rule_flags & RULE_REWRITE) ) r->rule_flags &= ~RULE_GLOBAL; - if ( r->rule_flags & (RULE_INVERSE|RULE_REWRITE) ) { + if ( (r->rule_flags & (RULE_INVERSE|RULE_REWRITE)) == + (RULE_INVERSE|RULE_REWRITE) ) { syslog(LOG_ERR, "r rules cannot be inverted, line %d: %s\n", lineno, line); return -1; /* Error */ } diff --git a/version b/version index 751b1ea..744f3d7 100644 --- a/version +++ b/version @@ -1 +1 @@ -0.39 +0.40