summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhpa <hpa>2004-09-23 02:22:02 +0000
committerhpa <hpa>2004-09-23 02:22:02 +0000
commit9630aae0061ae3fc1f4fe9c82ca055610d1cf073 (patch)
tree7ea32f286e17033e6fc1ff15bc0a4d8b06d844d2
parent6299024e7a50cd36d95d9ef812b1bfe80baa4f67 (diff)
downloadtftp-hpa-9630aae0061ae3fc1f4fe9c82ca055610d1cf073.tar.gz
Correct bug which caused "r" rules to get incorrectly rejected as "ri" rules
-rw-r--r--CHANGES5
-rw-r--r--tftpd/remap.c3
-rw-r--r--version2
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