COMPLY(1M) RISC/os Reference Manual COMPLY(1M)
NAME
comply - check files against software bill of materials
SYNTAX
comply [ -fsedb ] [ -F mtogpsl ] [ -kn ] [ -ttime ] [
-ppasswdfile ] [ -ggroupfile ] bomfile ...
DESCRIPTION
comply is used to check a directory tree against a
``software bill of materials''. The bill of materials speci-
fies a directory tree, including directory and file names,
modes, owners, groups, link counts, and link associations.
All instances where the contents of the actual tree do not
match the tree specified in the bill of materials are
reported. To the extent practical, comply will also fix up
instances where the directory tree is found to be out of
compliance with the bill of materials.
comply should be executed in the relative root directory of
the tree to be checked. Files in a bill of materials file
(bomfile) are named relative to this directory. For example,
a file named usr/bin/file in a bomfile is checked against
the file ``./usr/bin/file''.
The -f option is used to enable fix mode. In fix mode, com-
ply will attempt to impose compliance with respect to file
ownership, group, and permissions, including set user and
group id bits. If links (symbolic or hard) specified in the
bomfile are missing or incorrect, they will be created or
fixed. If directories specified in the bomfile are missing,
they will be created. For directories to be created, all
directories in the pathname preceding the named directory
must already exist. To insure this condition, it is highly
recommended that each bomfile contain entries for every
directory mentioned in that bomfile. For example, if the
file /usr/foo/foofile is mentioned in a bom, then entries
for the directories /usr and /usr/foo (in that order) should
precede the entry for /usr/foo/foofile.
Currently, no other fixes are attempted. Only the super-user
may run comply in fix mode. Without -f, comply will only
report files or directories found to be out of compliance.
The -F option allows individual kinds of fixes to be enabled
(as opposed to -f which enables all of the fixes explained
above.) -F is followed by one or more of the following key
letters, each of which, if present, enables one type of fix:
m create missing entries (directory, symbolic link,
or hard link)
t correct files which exist, but are not of the
Printed 11/19/92 Page 1
COMPLY(1M) RISC/os Reference Manual COMPLY(1M)
correct type (when the file should be directory,
symbolic link, or hard link, but isn't)
o correct file ownerships
g correct file groups
p correct file permissions
s correct symbolic links
l correct hard links
The -s option causes comply to run silently; in fix mode,
fixes will be attempted, but no messages will be produced
when files or directories are found to be out of compliance.
With the -e (extra files) option, comply writes a list of
pathnames of files present in the tree being checked, but
absent in the bill of material file(s). If the -d option is
also specified along with -e, an attempt will be made to
remove such files from the tree being checked. Only the
super-user may run comply with -d. CAUTION: the -d option
can be very dangerous, since in most instances there are
legitimate reasons for files not in the bom files to exit a
tree, and they can intentionally deleted.
If only the list of extra files is desired, and the -d
option is not required, the the script extra can be run
directly. It takes as arguments a list of bomfiles, and pro-
duces a newline-separated list of extra files on its stan-
dard output.
The -kn option sets an error threshold. comply will ter-
minate when n errors have been detected in fix mode; an n of
0 means ``no limit'' (the default). Optional white space may
separate the ``-k'' and n.
The -ttime option causes comply to set the modification
times of all files to a specific time and date. The time is
given as the number of seconds since midnight January 1,
1970 GMT. Optional white space may separate the ``-t'' and
time.
When the -b option is present, comply will read the
bomfile(s), checking for correct syntax, but will not not
check the files specified. This can be used to find badly
formed bomfile records before a ``real'' run of comply is
performed.
The bomfiles contain the bills of material. The format of
these files is described in bom(4).
Page 2 Printed 11/19/92
COMPLY(1M) RISC/os Reference Manual COMPLY(1M)
If the -p flag is present, the file named is a password file
to use instead of /etc/passwd. The -g flag allows a group
file to be specified in place of .etc.group.
comply returns an exit status of 0 if complete conformance
was achieved, nonzero otherwise.
FILES
/etc/passwd to get user id's
/etc/group to get group id's
/usr/pkg/bin/extra to detect extra files if -e is speci-
fied.
/usr/pkg/bin/comply
/usr/pkg/bin/extra
SEE ALSO
bom(4)
Printed 11/19/92 Page 3