- Makes it so that
${BITCOIND_BIN}is actually used ascommand=, rather than the hardcoded/usr/bin/bitcoind. - Passes
BITCOIND_GROUPtostart-stop-daemon, so that the daemon process itself runs under it.
contrib/init: fix unused variables in openrc script #35978
pull jpk68 wants to merge 1 commits into bitcoin:master from jpk68:openrc-vars changing 1 files +2 −1-
jpk68 commented at 11:05 PM on August 14, 2026: none
-
contrib/init: fix unused variables in openrc script d837bb38a4
-
DrahtBot commented at 11:06 PM on August 14, 2026: contributor
<!--e57a25ab6845829454e8d69fc972939a-->
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
<!--006a51241073e994b41acfe9ec718e94-->
Code Coverage & Benchmarks
For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/35978.
<!--021abf342d371248e50ceaed478a90ca-->
Reviews
See the guideline and AI policy for information on the review process.
Type Reviewers ACK winterrdog, jeanpablojp If your review is incorrectly listed, please copy-paste <code><!--meta-tag:bot-skip--></code> into the comment that the bot should ignore.
<!--5faf32d7da4f0f540f40219e4f7537a3-->
-
sedited commented at 1:08 PM on August 18, 2026: contributor
The variable reuse seems fine, but would you say that passing the group in is a bug fix?
-
jpk68 commented at 7:26 PM on August 18, 2026: none
The variable reuse seems fine, but would you say that passing the group in is a bug fix?
Yes, I think it is.
-
winterrdog commented at 11:08 PM on August 18, 2026: contributor
utACK d837bb38a44de445d2c459a477302d78871ae1a6
reply-to: #35978 (comment)
but would you say that passing the group in is a bug fix?
it is a genuine bug fix, just one that rarely triggers because
BITCOIND_GROUPdefaults tobitcoin, which is also typically thebitcoinuser's primary group, so the two coincide by default. it only shows up whenBITCOIND_GROUPis overridden to something elsestart_pre()already sets the datadir, PID directory, and config file ownership to${BITCOIND_USER}:${BITCOIND_GROUP}. without-g, the daemon instead runs under the user's primary group, so the two can diverge whenBITCOIND_GROUPis intentionally overridden, potentially affecting access to files the daemon creates or accesses at runtime. adding-g ${BITCOIND_GROUP}fixes that by making the daemon use the same group configured bystart_pre() -
jeanpablojp commented at 3:04 PM on August 19, 2026: contributor
utACK d837bb38a44de445d2c459a477302d78871ae1a6
I also agree this is a bug. Another concrete example I found is
-rpccookieperms=group. That makes the.cookiegroup-readable, but by the user's primary group and not by theBITCOIND_GROUPthatstart_pre()put on the datadir.