-
Notifications
You must be signed in to change notification settings - Fork 13
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
Fix: CVE-2017-18925 #21
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 <[email protected]> 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 <[email protected]> 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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please rebase onto the latest master branch
Ping. |
I will do the rebase this weekend. |
Merge master |
it doesn't seem like you've fully rebased onto the latest master branch yet |
I will better create a new clean branch and a new PR. Let me try... |
New clean PR is #22 |
Signed-off-by: Sandio Araico Sanchez [email protected]
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