Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 650854 - sys-devel/distcc: init script should use checkpath instead of mkdir/chown
Summary: sys-devel/distcc: init script should use checkpath instead of mkdir/chown
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Cluster Team
Depends on:
Reported: 2018-03-19 08:04 UTC by Georgy Yakovlev
Modified: 2022-05-31 07:02 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Note You need to log in before you can comment on or make changes to this bug.
Description Georgy Yakovlev archtester gentoo-dev 2018-03-19 08:04:05 UTC
There was a long discussion about that

currently distcc initscript calls chown as a part of start function

start() {
	ebegin "Starting distccd"

	if [ ! -e /var/run/distccd ] ; then
		mkdir -p /var/run/distccd
		chown distcc:daemon /var/run/distccd
Comment 1 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2018-12-08 12:47:39 UTC
Could you please commit a fix for this?  I'm not using OpenRC, so can't test it.  No need to send patch for review, I trust you.
Comment 2 Larry the Git Cow gentoo-dev 2018-12-09 06:40:54 UTC
The bug has been referenced in the following commit(s):

commit ffd45776bb13d8ee7140fd5499413a7ffa873798
Author:     Georgy Yakovlev <>
AuthorDate: 2018-12-09 06:17:53 +0000
Commit:     Georgy Yakovlev <>
CommitDate: 2018-12-09 06:35:53 +0000

    sys-devel/distcc: improve init.d script, secure pidfile handling
    removed unneeded start/stop functions
    removed gcc spec/path loading, it's useless because
    path whitelist is handled by compiler-shadow and we no longer
    use gcc specs.
    pidfile is now owned by root and created by s-s-d
    pidfile path is now controlled by service name (/run/
    initfile no longer runs chmod on pidfile and parent directory.
    Package-Manager: Portage-2.3.52, Repoman-2.3.12
    Signed-off-by: Georgy Yakovlev <>

 sys-devel/distcc/distcc-3.3.2-r1.ebuild | 196 ++++++++++++++++++++++++++++++++
 sys-devel/distcc/files/distccd.confd    |  37 ++++++
 sys-devel/distcc/files/distccd.initd    |  13 +++
 3 files changed, 246 insertions(+)
Comment 3 Georgy Yakovlev archtester gentoo-dev 2018-12-09 06:47:30 UTC
ok I pushed updated openrc script, much better than it was but still not ideal.

I've found more openrc related bugs, most are pretty old.
I'll go thru them and will try to fix as time permits.

here's the list.  =sys-devel/distcc-3.1 - /etc/conf.d/distccd: set log level severity to something more severe than "notice"  access violation when using distcc with DISTCC_LOG  - ERROR: failed to open /var/log/distccd.log: Permission denied -  Support for multiple distccd instances

also logging needs some attention. Upstream recommends using logfile, not syslog. and default is syslog now. And it needs logrotate file.
Comment 4 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2018-12-09 08:38:59 UTC
Thanks for taking care of it.
Comment 5 crabbed halo ablution 2020-12-17 19:03:19 UTC
I think this bug is FIXED now by commit ffd45776bb13d8ee7140fd5499413a7ffa873798 as seen above. The other bugs mentioned have their own open bugs.