[openSUSE/osc] d56a46: Improve logic for conffile mode handling
Branch: refs/heads/master Home: https://github.com/openSUSE/osc Commit: d56a46b669d68c5218b1d3e5135a60efc341617f https://github.com/openSUSE/osc/commit/d56a46b669d68c5218b1d3e5135a60efc3416... Author: William Brown <wbrown@suse.de> Date: 2021-10-25 (Mon, 25 Oct 2021) Changed paths: M osc/conf.py Log Message: ----------- Improve logic for conffile mode handling Commit: 3ba867cf94e63fd8bfd8268c12c9aa75402944e3 https://github.com/openSUSE/osc/commit/3ba867cf94e63fd8bfd8268c12c9aa7540294... Author: Marcus Huewe <suse-tux@gmx.de> Date: 2021-10-25 (Mon, 25 Oct 2021) Changed paths: M osc/conf.py Log Message: ----------- Merge branch 'improve-mode-handling' of https://github.com/Firstyear/osc Only change the mode of a config file if it is different from 0o600 (instead of unconditionally calling os.chmod). The advantage of the new behavior is that it also works with a read-only filesystem. Additionally, if the mode is not 0o600 and the config file resides on a read-only filesystem, we print a warning and continue (actually, this change is debatable but it is also not too bad because the config file does not necessarily have to contain the passwords anymore... (let's keep our fingers crossed that no 3rd party application relied on the "implicit" os.chmod API, though)). Compare: https://github.com/openSUSE/osc/compare/16ec3ff9f91b...3ba867cf94e6
participants (1)
-
Marcus Hüwe