Fix: CVE-2017-18925#21
Closed
KenjiBrown wants to merge 10 commits intoOpenRC:masterfrom
Closed
Conversation
This function did not actually create a directory. Also, we did not respect that mode could be optional.
According to the tmpfiles.d man page I've read, Modes, owners and groups are always optional.
If owners, modes or groups are not specified use the defaults from the tmpfiles.d man page
There is a big difference between how these tests behave: 1. [ foo ] && bar 2. if [ foo ]; then bar; fi The first test will return a failure return code if foo is false, and this was causing issues, so we need the second test. This is for OpenRC#1.
Signed-off-by: Sandio Araico Sanchez <sandino@sandino.net> Gentoo bug #540006 hardened mode for opentmpfiles Ignore some recursive options Refuse to remove root-owned dirs and files Refuse to chmod/chdir/chown user-owned dirs and files Check non-existence before creating a directory Ensure directory has been newly created before chown/chmod/chgrp exit on error
Signed-off-by: Sandio Araico Sanchez <sandino@sandino.net> Bug #540006 hardened mode for opentmpfiles Ignore some recursive options Refuse to remove root-owned dirs and files Refuse to chmod/chdir/chown user-owned dirs and files Check non-existence before creating a directory Ensure directory has been newly created before chown/chmod/chgrp exit on error
vapier
requested changes
Apr 30, 2022
Member
vapier
left a comment
There was a problem hiding this comment.
please rebase onto the latest master branch
|
Ping. |
Author
|
I will do the rebase this weekend. |
Author
|
Merge master |
Member
|
it doesn't seem like you've fully rebased onto the latest master branch yet |
Author
|
I will better create a new clean branch and a new PR. Let me try... |
Author
|
New clean PR is #22 |
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.
Signed-off-by: Sandio Araico Sanchez sandino@sandino.net
Bug #540006
hardened mode for opentmpfiles
Ignore some recursive options
Refuse to remove root-owned dirs and files
Refuse to chmod/chdir/chown user-owned dirs and files
Check non-existence before creating a directory
Ensure directory has been newly created before chown/chmod/chgrp
exit on error