archive-dir=/etc/config-archive
# Use rcs for storing files in the archive directory?
+# WARNING: When configured to use rcs, read and execute permissions of
+# archived files may be inherited from the first check in of a working
+# file, as documented in the ci(1) man page. This means that even if
+# the permissions of the working file have since changed, the older
+# permissions of the first check in may be inherited. As mentioned in
+# the ci(1) man page, users can control access to RCS files by setting
+# the permissions of the directory containing the files (see
+# archive-dir above).
# (yes or no)
use-rcs=no
-.TH "DISPATCH-CONF" "1" "Aug 2008" "Portage VERSION" "Portage"
+.TH "DISPATCH-CONF" "1" "Jan 2011" "Portage VERSION" "Portage"
.SH NAME
dispatch-conf \- Sanely update configuration files after emerging new packages
.SH SYNOPSIS
.B q
Quit
.I dispatch-conf.
+.SH FILE MODES
+\fBWARNING:\fR When \fB/etc/dispatch\-conf.conf\fR is configured
+to use \fBrcs\fR(1), read and execute permissions of archived
+files may be inherited from the first check in of a working file,
+as documented in the \fBci\fR(1) man page. This means that even
+if the permissions of the working file have since changed, the
+older permissions of the first check in may be inherited. As
+mentioned in the \fBci\fR(1) man page, users can control access
+to RCS files by setting the permissions of the directory
+containing the files.
.SH "REPORTING BUGS"
Please report bugs via http://bugs.gentoo.org/
.SH AUTHORS
Configuration settings for \fIdispatch-conf\fR are stored here.
.SH "SEE ALSO"
.BR make.conf (5),
-.BR etc-update (1)
+.BR ci (1),
+.BR etc-update (1),
+.BR rcs (1)
# archive_conf.py -- functionality common to archive-conf and dispatch-conf
-# Copyright 2003-2004 Gentoo Foundation
+# Copyright 2003-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
if not os.path.exists(opts['archive-dir']):
os.mkdir(opts['archive-dir'])
+ # Use restrictive permissions by default, in order to protect
+ # against vulnerabilities (like bug #315603 involving rcs).
+ os.chmod(opts['archive-dir'], 0o700)
elif not os.path.isdir(opts['archive-dir']):
print(_('dispatch-conf: Config archive dir [%s] must exist; fatal') % (opts['archive-dir'],), file=sys.stderr)
sys.exit(1)