mode:source_host:destination_host:file
The mode field specifies if a rule is to allow or block a file being distributed from a source- to a destination host.
The fields source_host, destination_host and file are regular expressions.
The rules are processed in the sequence listed. If a rule matches, the remaining rules are not processed any more.
The last rule that is processed by filedist is always
block:.*:.*:.*if no previous rule matched. Therefore if you like to allow all distributions except the defined blocked files, the rule
allow:.*:.*:.*has to be added as the very last rule in the etc/filedist.block file.
Regular expression hints:
See also EXAMPLES section.
This definition helps, that only files in the directories /opt/edrc, the installation directory of WA2L/edrc, and /tmp are allowed to be distributed from and to dcdbsi50.
This example has the background, that the host dcdbsi50 is a Sun Solaris system and all other hosts are HP-UX systems. To avoid miss-configuration of the systems by distributing operating system files that might have a different format on either one of the two operating systems, only a very reduced set of files is allowed to be distributed.
The last rule in this example ensures, that between all other systems all files are allowed to be distributed.
# # filedist.block - filedist configuration file to block # (prevent) files from distribution # # [00] 11.08.2003 CWa Initial Version # # # Fileformat: # # <mode>:<source_host>:<destination_host>:<file> # # Fields: # <mode> = allow or block # <source_host>, <destination_host> and <file> # are regular expressions # # Hints: # all hosts = .* # all files = .* # range = dcdbsi5[1-2] # # RULES: # # The rules are processed in the sequence listed. # If a rule matches, the remaining rules are not # processed any more. # # allow only /opt/edrc/* and /tmp/* files to be # distributed from and to dcdbsi50. # allow:.*:.*:/opt/edrc/.* allow:.*:.*:/tmp/.* block:.*:dcdbsi50:.* block:dcdbsi50:.*:.* # last rule, allow all distributions, when no # previous rule matched. # allow:.*:.*:.*
This is free software; see edrc/doc/COPYING for copying conditions. There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.