[#839] Adjusts permissions of sqitch.conf (and friends) every time#901
Open
fluca1978 wants to merge 1 commit intosqitchers:developfrom
Open
[#839] Adjusts permissions of sqitch.conf (and friends) every time#901fluca1978 wants to merge 1 commit intosqitchers:developfrom
sqitch.conf (and friends) every time#901fluca1978 wants to merge 1 commit intosqitchers:developfrom
Conversation
…ery time Every time the configuration is loaded, the file permissions are checked and if they are different from `0600`, they are adjusted via an explicit `chmod`. The rationale is to ensure, as much as possibile, that configuration including target credentials remains private to the user. This introduces the dependency with `File::stat`, in order to perform a more OOP-`stat` call. The `App::Sqitch::Config::load_file` method has changed in order to call a new function, `::chmod_files_if_needed` that accepts a list of file-ish stuff to check against permissions.
d4ab60e to
ee75656
Compare
Collaborator
|
I'm not sure this is desirable or even useful, as Stefanie Janine Stölting points out:
Git doesn't enforce something like this, AFAICT. I'm not sure it makes sense for Sqitch to do so, either. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Every time the configuration is loaded, the file permissions are checked and if they are different from
0600, they are adjusted via an explicitchmod.The rationale is to ensure, as much as possibile, that configuration including target credentials remains private to the user.
This introduces the dependency with
File::stat, in order to perform a more OOP-statcall.The
App::Sqitch::Config::load_filemethod has changed in order to call a new function,::chmod_files_if_neededthat accepts a list of file-ish stuff to check against permissions.