.\" Copyright (c) 2001, 2003 Allan Saddi .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" .\" THIS SOFTWARE IS PROVIDED BY ALLAN SADDI AND HIS CONTRIBUTORS ``AS IS'' .\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL ALLAN SADDI OR HIS CONTRIBUTORS BE .\" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" .\" $Id: yafic.conf.5 925 2003-12-12 23:57:35Z asaddi $ .TH YAFIC.CONF 5 "December 12, 2003" .SH NAME yafic.conf -- yafic(1) configuration file .SH DESCRIPTION .B yafic.conf is the configuration file used by yafic(1). It specifies how yafic(1) should examine the filesystem. .P Blank lines are ignored. .LP You may use double quotes ``"'' to enclose strings with spaces. Escape double quotes by prefixing them with a ``\\''. .LP Comments begin with ``#''. Everything until the end of line is ignored. You may escape ``#'' characters by either quoting them or prefixing them with a ``\\''. .LP A line ending with ``\\'' specifies that the line following it is to be interpreted as its continuation. .P Each line is of the form: .P .I entry-name .I flags .P Where .I entry-name is the name of a file or directory (relative to the root. See the .B -r option to yafic(1)) and .I flags are which file attributes to check. .SS DIRECTORY RECURSION Normally, if .I entry-name is a directory, its contents will also be checked using .IR flags . This behavior can be changed by using prefixes. .P An entry defined with the form .P .RI ! entry-name .P will be ignored. .I entry-name and its contents will not be examined. An entry defined like this: .P .RI = entry-name " " flags .P will mean that the contents of .I entry-name will not be looked at. .I flags will apply to .IR entry-name " and " entry-name " only." Finally, an entry defined like this: .P .RI $ entry-name " " flags .P will still have its contents checked. However, .I flags will only apply to .IR entry-name . Its contents will keep their previous flags. If no flags were previously defined, then the contents will inherit the flags from .IR entry-name 's parent. If there is no entry for .IR entry-name 's parent or the entry is an ignore entry, then the flags will be inherited from .IR entry-name 's grandparent, etc. This will continue up to the root until a non-ignored entry is found. If none is found, the contents will inherit the default flags. .P Directories that serve as mount points for other filesystems are always ignored and are never recursed into. To recurse into a mount point, an entry for it must be explicitly defined. .SS FILE ATTRIBUTE FLAGS Each entry can be checked for changes in certain file attributes. These attributes are: .TP .B p Permissions/mode. .TP .B i inode number. .TP .B n Number of links. .TP .B u User ID. .TP .B g Group ID. .TP .B s Size. .TP .B a Access timestamp. .TP .B m Modification timestamp. .TP .B c Creation timestamp/inode modification timestamp. .TP .B h SHA-1 hash of contents. .P If .I flags is unspecified, it defaults to .RB ` pinugmch '. Flags can be added or removed relative to the default by prefixing them with ``+'' or ``-''. For example: .P .RS /some/file +s-mh .RE .P The resultant flags for /some/file would be .RB ` pinugsc '. .P For convenience, there are a few flag templates defined: .TP .B R Same as .RB ` pinugmch '. (`Read-only') .TP .B L Same as .RB ` pinug '. (`Log file') .TP .B N Same as .RB ` pinugsamch '. (`Ignore nothing') .TP .B E Same as `'. (`Ignore everything') .P If a template is used, it must be the first listed. Flags may be added or removed from a template by prefixing them with ``+'' or ``-'' respectively. For example: .P .RS /another/file L+h .RE .P /another/file would have the flags .RB ` pinugh '. .P If you wish to know when files are added or removed from a directory, but you don't care about changes to the directory or its contents, you must use the ``E'' template rather than prefixing the directory with ``!''. .SS NOTE ABOUT ORDER Each entry is parsed in order. Entries defined later will override earlier ones. So, for example: .P .RS !/var .br /var/log L .RE .P means that /var and its contents will be ignored. However, /var/log and its contents will be checked using the ``L'' template. Changing the order changes the meaning: .P .RS /var/log L .br !/var .RE .P In this case, /var and its contents are totally ignored. The /var/log entry is overridden by the subsequent !/var. .SS PER-TYPE FLAG MASKS Optionally, one or more of the following special entries can appear: .P .RS %dirmask .I mask .br %filemask .I mask .br %linkmask .I mask .br %specialmask .I mask .RE .P .I mask is parsed exactly like .IR flags , described previously. .P When changes are detected in an entry, depending on the entry's type (directory, file, symbolic links, special), one of the four masks is checked. The change is reported only if the corresponding flag is set in the mask. .P By default, all masks have all flags .RB (' pinugsamch ') set. .P Note that when a mask for a particular type is set, only entries defined afterwards inherit that mask. .SH FILES .TP yafic.conf Default yafic(1) configuration file. .SH SEE ALSO yafic(1)