forked from mirrors/tftp-hpa-google
tftpd: handle rule filter flags more cleanly
Instead of a bunch of ad hoc tests, keep a bitmask of flags that would keep this rule from being executed. This also removes the ugly hack of converting the request mode between opcode and character encodings for really no good reason. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
This commit is contained in:
parent
6f96fcd1b6
commit
351907e3f0
3 changed files with 22 additions and 21 deletions
|
@ -1417,8 +1417,7 @@ static char *rewrite_access(const struct formats *pf, char *filename,
|
|||
{
|
||||
if (rewrite_rules) {
|
||||
char *newname =
|
||||
rewrite_string(pf, filename, rewrite_rules,
|
||||
mode != RRQ ? 'P' : 'G', af,
|
||||
rewrite_string(pf, filename, rewrite_rules, mode, af,
|
||||
rewrite_macros, msg);
|
||||
filename = newname;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue