michael@795: # michael@795: # tftpd.remap -- TFTP Daemon Path Remapping michael@795: # michael@795: # This file has three fields: operation, regex, remapping michael@795: # michael@795: # The operation is a combination of the following letters: michael@795: # michael@795: # r - rewrite the matched string with the remapping pattern michael@795: # i - case-insensitive matching michael@795: # g - repeat until no match (used with "r") michael@795: # e - exit (with success) if we match this pattern, do not process michael@795: # subsequent rules michael@795: # s - start over from the first rule if we match this pattern michael@795: # a - abort (refuse the request) if we match this rule michael@795: # G - this rule applies to TFTP GET requests only michael@795: # P - this rule applies to TFTP PUT requests only michael@795: # michael@795: # The regex is a regular expression in the style of egrep(1). michael@795: # michael@795: # The remapping is a pattern, all characters are verbatim except \ michael@795: # \0 copies the full string that matched the regex michael@795: # \1..\9 copies the 9 first (..) expressions in the regex michael@795: # \\ is an escaped \ michael@795: # michael@795: # "#" begins a comment, unless \-escaped michael@795: # michael@795: ri ^[a-z]: # Remove drive letters michael@795: rg \\ / # Convert backslashes to slashes michael@795: rg \# @ # Convert hash marks to @ signs michael@795: rg /../ /..no../ # Convert /../ to /..no../ michael@795: e ^incoming/ # These are always ok michael@795: r ^[^/] /\0 # Convert nonabsolute files michael@795: a ^\. # Reject requests for hidden files