forked from mirrors/tftp-hpa-google
tftpd: allow a rewrite rule to probe for the existence of a file
This adds an "E" flag to the rewrite rules, which exits rule processing if and only if the result is a valid, accessible filename. If combined with "r", the rewrite is cancelled if the rule is not applied. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
This commit is contained in:
parent
1dc6d55811
commit
6f96fcd1b6
5 changed files with 103 additions and 47 deletions
|
@ -35,7 +35,9 @@ struct rule *parserulefile(FILE *);
|
|||
void freerules(struct rule *);
|
||||
|
||||
/* Execute a rule set on a string; returns a malloc'd new string. */
|
||||
char *rewrite_string(const char *, const struct rule *, char, int,
|
||||
struct formats;
|
||||
char *rewrite_string(const struct formats *, const char *,
|
||||
const struct rule *, char, int,
|
||||
match_pattern_callback, const char **);
|
||||
|
||||
#endif /* WITH_REGEX */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue