tftpd: allow a rewrite rule to probe for the existence of a file
commit6f96fcd1b669dbf9c0a3d96d26d370117fddcadd
authorH. Peter Anvin <hpa@zytor.com>
Thu, 30 May 2024 00:16:06 +0000 (29 17:16 -0700)
committerH. Peter Anvin <hpa@zytor.com>
Thu, 30 May 2024 00:16:06 +0000 (29 17:16 -0700)
tree5f67361a11096d5984674f3ba225f56f6701e80e
parent1dc6d558115746f50e78ba8d84915a56ae66ec5f
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>
tftpd/remap.c
tftpd/remap.h
tftpd/tftpd.8.in
tftpd/tftpd.c
tftpd/tftpd.h