tftp/tftpd.remap

changeset 795
ef076e9bc56b
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/tftp/tftpd.remap	Mon Aug 25 19:06:31 2014 +0200
     1.3 @@ -0,0 +1,33 @@
     1.4 +#
     1.5 +# tftpd.remap -- TFTP Daemon Path Remapping
     1.6 +#
     1.7 +# This file has three fields: operation, regex, remapping
     1.8 +#
     1.9 +# The operation is a combination of the following letters:
    1.10 +#
    1.11 +# r - rewrite the matched string with the remapping pattern
    1.12 +# i - case-insensitive matching
    1.13 +# g - repeat until no match (used with "r")
    1.14 +# e - exit (with success) if we match this pattern, do not process
    1.15 +#     subsequent rules
    1.16 +# s - start over from the first rule if we match this pattern
    1.17 +# a - abort (refuse the request) if we match this rule
    1.18 +# G - this rule applies to TFTP GET requests only
    1.19 +# P - this rule applies to TFTP PUT requests only
    1.20 +#
    1.21 +# The regex is a regular expression in the style of egrep(1).
    1.22 +#
    1.23 +# The remapping is a pattern, all characters are verbatim except \
    1.24 +# \0 copies the full string that matched the regex
    1.25 +# \1..\9 copies the 9 first (..) expressions in the regex
    1.26 +# \\ is an escaped \
    1.27 +#
    1.28 +# "#" begins a comment, unless \-escaped
    1.29 +#
    1.30 +ri	^[a-z]:					# Remove drive letters
    1.31 +rg	\\		/				# Convert backslashes to slashes
    1.32 +rg	\#		@				# Convert hash marks to @ signs
    1.33 +rg	/../		/..no../	# Convert /../ to /..no../
    1.34 +e	^incoming/				# These are always ok
    1.35 +r	^[^/]		/\0			# Convert nonabsolute files
    1.36 +a	^\.						# Reject requests for hidden files

mercurial