sync
[bitrig.git] / share / man / man5 / changelist.5
blobb67ae0b3a27ac52bab2932efc327c7b85f95b8be
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
26 The
27 .Pa /etc/changelist
28 file is a simple text file containing the names of files to be backed up
29 and checked for modification by the system security script,
30 .Xr security 8 .
31 It is checked daily by the
32 .Pa /etc/daily
33 script.
34 See
35 .Xr daily 8
36 for further details.
37 .Pp
38 Each line of the file contains the name of a file,
39 specified by its absolute pathname,
40 one per line.
41 By default, configuration files in
42 .Pa /etc ,
43 .Pa /root ,
44 and
45 .Pa /var
46 are added during system install.
47 Administrators may add additional files at their discretion.
48 Shell globbing is supported in pathnames.
49 .Pp
50 Backup files are held in the directory
51 .Pa /var/backups .
52 A backup of the current version of a file is kept in this directory, marked
53 .Qq current .
54 When the file is altered, the old version is marked as
55 .Qq backup
56 and the new version becomes
57 .Qq current .
58 .Pp
59 For example,
60 the system shell database,
61 .Pa /etc/shells ,
62 is held as
63 .Pa /var/backups/etc_shells.current .
64 When this file is modified, it is renamed to
65 .Pa /var/backups/etc_shells.backup
66 and the new version becomes
67 .Pa /var/backups/etc_shells.current .
68 Thereafter, these files are rotated.
69 .Pp
70 Diffs are mailed to the root administrator, in unified
71 .Xr diff 1
72 format, via
73 .Xr daily 8 ,
74 in the following format:
75 .Bd -unfilled -offset indent
76 =====
77 /etc/shells diffs (-OLD  +NEW)
78 =====
79 .Ed
80 .Pp
81 Files in
82 .Pa /etc/changelist
83 beginning with a
84 .Sq +
85 character
86 .Pq generally non-text files
87 are stored as
88 .Xr sha256 1
89 checksums.
90 Results are mailed in the following format:
91 .Bd -unfilled -offset indent
92 ======
93 /etc/ssh/ssh_host_key SHA-256 checksums
94 ======
95 OLD:
96 NEW:
97 .Ed
98 .Pp
99 Lines beginning with the comment character
100 .Pq Sq # ,
101 blank lines,
102 and 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
107 Default changelist.
108 .It Pa /etc/daily
109 Maintenance script which runs
110 .Xr security 8 .
111 .It Pa /var/backups/
112 Directory containing file backups.
114 .Sh SEE ALSO
115 .Xr diff 1 ,
116 .Xr sha256 1 ,
117 .Xr daily 8 ,
118 .Xr security 8
119 .Sh HISTORY
122 manual page first appeared in
123 .Ox 3.5 .
124 .Sh CAVEATS
125 Anyone with the privileges to alter system configuration files
126 could also alter the backup files in
127 .Pa /var/backups .
128 It is important that this directory be owned by root:wheel
129 and have permissions 0700 set.
131 Removal of the
132 .Pa /etc/changelist
133 file itself could cause confusion.
136 cannot warn about files being added to the system, although
137 .Xr security 8
138 will pick up on any files listed in
139 .Pa /etc/changelist
140 being added or deleted.
141 Removals are only noticed for files listed explicitly,
142 but not for files matched by globbing.
144 If you hose your system configuration files,
145 you just might be able to find the information you need in
146 .Pa /var/backups .
147 This is not a CAVEAT, but we had to let you know somehow!