Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NodeUtility::WriteNodeConfigObjects(): avoid unneccessary Utility::SetFileOwnership() #8744

Merged
merged 1 commit into from
Feb 1, 2023

Conversation

Al2Klimov
Copy link
Member

fixes #8743

@icinga-probot icinga-probot bot added this to the 2.13.0 milestone Apr 29, 2021
@icinga-probot icinga-probot bot added area/setup Installation, systemd, sample files bug Something isn't working labels Apr 29, 2021
@Al2Klimov Al2Klimov modified the milestones: 2.13.0, 2.14.0 Jun 2, 2021
@Al2Klimov
Copy link
Member Author

@cla-bot check

@cla-bot cla-bot bot added the cla/signed label Aug 4, 2021
@Al2Klimov Al2Klimov added this to unsorted in 42 quadrillions PRs Aug 10, 2021
@Al2Klimov Al2Klimov moved this from unsorted to awaits implementation detail review in 42 quadrillions PRs Aug 10, 2021
@julianbrost
Copy link
Contributor

In the current state, the call definitely doesn't make sense. It chowns the file just before it's replaced with a new version. However, I think it could have been the intention of the code to actually chown tempFilename instead of filename (or rather filename after the move), especially given that this is done on the directory as well. Is this code always executed as the icinga user? Then the chown would be pointless as the new file is owned by that user already anyways.

@Al2Klimov Al2Klimov self-assigned this Jan 27, 2023
@Al2Klimov
Copy link
Member Author

Is this code always executed as the icinga user?

Yes. This is node-setup-only code and the respective CLI commands drop permissions.

@Al2Klimov Al2Klimov removed their assignment Jan 27, 2023
@julianbrost julianbrost merged commit 2b43354 into master Feb 1, 2023
42 quadrillions PRs automation moved this from awaits implementation detail review to done Feb 1, 2023
@icinga-probot icinga-probot bot deleted the bugfix/unnecessary-chown-8743 branch February 1, 2023 13:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/setup Installation, systemd, sample files bug Something isn't working cla/signed
Projects
Development

Successfully merging this pull request may close these issues.

Unnecessary chown during wizard run throws error while everything works fine
2 participants