1.\" $OpenBSD: changelist.5,v 1.8 2012/07/08 21:48:38 schwarze Exp $ 2.\" 3.\" Copyright (c) 2003 Jason McIntyre <jmc@openbsd.org> 4.\" 5.\" Permission to use, copy, modify, and distribute this software for any 6.\" purpose with or without fee is hereby granted, provided that the above 7.\" copyright notice and this permission notice appear in all copies. 8.\" 9.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 15.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16.\" 17.Dd $Mdocdate: July 8 2012 $ 18.Dt CHANGELIST 5 19.Os 20.Sh NAME 21.Nm changelist 22.Nd list of backup files 23.Sh SYNOPSIS 24.Nm /etc/changelist 25.Sh DESCRIPTION 26The 27.Pa /etc/changelist 28file is a simple text file containing the names of files to be backed up 29and checked for modification by the system security script, 30.Xr security 8 . 31It is checked daily by the 32.Pa /etc/daily 33script. 34See 35.Xr daily 8 36for further details. 37.Pp 38Each line of the file contains the name of a file, 39specified by its absolute pathname, 40one per line. 41By default, configuration files in 42.Pa /etc , 43.Pa /root , 44and 45.Pa /var 46are added during system install. 47Administrators may add additional files at their discretion. 48Shell globbing is supported in pathnames. 49.Pp 50Backup files are held in the directory 51.Pa /var/backups . 52A backup of the current version of a file is kept in this directory, marked 53.Qq current . 54When the file is altered, the old version is marked as 55.Qq backup 56and the new version becomes 57.Qq current . 58.Pp 59For example, 60the system shell database, 61.Pa /etc/shells , 62is held as 63.Pa /var/backups/etc_shells.current . 64When this file is modified, it is renamed to 65.Pa /var/backups/etc_shells.backup 66and the new version becomes 67.Pa /var/backups/etc_shells.current . 68Thereafter, these files are rotated. 69.Pp 70Diffs are mailed to the root administrator, in unified 71.Xr diff 1 72format, via 73.Xr daily 8 , 74in the following format: 75.Bd -unfilled -offset indent 76===== 77/etc/shells diffs (-OLD +NEW) 78===== 79.Ed 80.Pp 81Files in 82.Pa /etc/changelist 83beginning with a 84.Sq + 85character 86.Pq generally non-text files 87are stored as 88.Xr sha256 1 89checksums. 90Results are mailed in the following format: 91.Bd -unfilled -offset indent 92====== 93/etc/ssh/ssh_host_key SHA-256 checksums 94====== 95OLD: 96NEW: 97.Ed 98.Pp 99Lines beginning with the comment character 100.Pq Sq # , 101blank lines, 102and non-existent files are all silently ignored. 103.\" .Sh ENVIRONMENT 104.Sh FILES 105.Bl -tag -width /etc/changelist -compact 106.It Pa /etc/changelist 107Default changelist. 108.It Pa /etc/daily 109Maintenance script which runs 110.Xr security 8 . 111.It Pa /var/backups/ 112Directory containing file backups. 113.El 114.Sh SEE ALSO 115.Xr diff 1 , 116.Xr sha256 1 , 117.Xr daily 8 , 118.Xr security 8 119.Sh HISTORY 120The 121.Nm 122manual page first appeared in 123.Ox 3.5 . 124.Sh CAVEATS 125Anyone with the privileges to alter system configuration files 126could also alter the backup files in 127.Pa /var/backups . 128It is important that this directory be owned by root:wheel 129and have permissions 0700 set. 130.Pp 131Removal of the 132.Pa /etc/changelist 133file itself could cause confusion. 134.Pp 135.Nm 136cannot warn about files being added to the system, although 137.Xr security 8 138will pick up on any files listed in 139.Pa /etc/changelist 140being added or deleted. 141Removals are only noticed for files listed explicitly, 142but not for files matched by globbing. 143.Pp 144If you hose your system configuration files, 145you just might be able to find the information you need in 146.Pa /var/backups . 147This is not a CAVEAT, but we had to let you know somehow! 148