init: Evaluate sysperms before config file #26512

pull willcl-ark wants to merge 1 commits into bitcoin:master from willcl-ark:2022_13371_sysperms changing 2 files +10 −4
  1. willcl-ark commented at 2:09 PM on November 16, 2022: contributor

    Fixes #13371

    Currently we check the config file before applying the effect of the -sysperms program option. On first boot with no datadirectory this can result in directories (and settings.json file) being created with incorrect permissions.

    As I mention in #13371 this will change default file permissions from what they are currently which might risk breaking changes to upstream projects. If this is not desirable, then the alternative would be to leave the current behaviour and perhaps update the docs slightly.

  2. init: Evaluate sysperms before config file
    Fixes #13371
    
    Currently we check the config file before applying the effect of the
    `-sysperms` program option. On first boot, this can result in
    directories (and settings.json file) being created with incorrect
    permissions.
    fb3c590230
  3. DrahtBot commented at 2:09 PM on November 16, 2022: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline for information on the review process. A summary of reviews will appear here.

    <!--174a7506f384e20aa4161008e828411d-->

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #17127 (util: Set safe permissions for data directory and wallets/ subdir by hebasto)

    If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

  4. willcl-ark commented at 8:32 AM on November 17, 2022: contributor

    Thank you DrahtBot for linking #17127, I will close this for that one

  5. willcl-ark closed this on Nov 17, 2022

  6. luke-jr commented at 9:13 PM on November 19, 2022: member

    This is still needed to fix versions prior to whenever #17127 might get merged. Please reopen.

    But it has a bug: you can't set sysperms in the config file anymore.

  7. bitcoin locked this on Nov 19, 2023

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-27 03:14 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me