-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Fix: proper permissions for systemvm template registrations on hardened systems #12098
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
base: 4.20
Are you sure you want to change the base?
Fix: proper permissions for systemvm template registrations on hardened systems #12098
Conversation
|
Congratulations on your first Pull Request and welcome to the Apache CloudStack community! If you have any issues or are unsure about any anything please check our Contribution Guide (https://github.com/apache/cloudstack/blob/main/CONTRIBUTING.md)
|
…ed systems Related to apache#10029 (comment) We have umask 0077, so cloud-install-sys-tmplt is creating by default paths like below ``` $ ls -l /mnt/secondary/template/tmpl/ total 16 drwx------. 3 root root 4096 Nov 19 13:58 1 drwxrwxrwx. 7 root root 4096 Oct 31 09:42 2 drwxrwxrwx. 3 root root 4096 Oct 30 15:59 4 drwxr-xr-x. 2 root root 4096 Oct 31 10:21 5 $ ls -l /mnt/secondary/template/tmpl/1/ total 4 drwx------. 2 root root 4096 Nov 19 13:59 3 $ ls -l /mnt/secondary/template/tmpl/1/3/ total 549848 -rw-------. 1 root root 563032576 Nov 19 13:59 d23a1e19-c563-4f69-85ca-8721cf02082c.qcow2 -rw-------. 1 root root 287 Nov 19 13:59 template.properties ``` This results to the permissions problems later on, when trying to access the image Signed-off-by: Artem Sidorenko <[email protected]>
163100c to
1db260f
Compare
DaanHoogland
left a comment
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.
clgtm, but of course some people may be caught out by this. not sure what testing we need.
|
@blueorangutan package |
|
@DaanHoogland a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 4.20 #12098 +/- ##
=========================================
Coverage 16.18% 16.18%
- Complexity 13298 13300 +2
=========================================
Files 5657 5657
Lines 498470 498470
Branches 60493 60493
=========================================
+ Hits 80660 80665 +5
+ Misses 408830 408825 -5
Partials 8980 8980
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 15806 |
Description
Related to #10029 (comment)
We have umask 0077 (via
/etc/login.defs) on our hardened systems, so cloud-install-sys-tmplt is creating by default paths like belowThis results to the permissions problems later on, when trying to access the image.
setup-sysvm-tmpltneeds that change most likely too, as this script is called by cloudstack java code for systemvm image deploymentTypes of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
I changed the files on my test deployment, removed everything on the secondary storage and reimported the systemvmimage
How did you try to break this feature and the system with this change?
It shouldn't break something, as umask 0022 is the common default umask and here it's valid only for the scope of executed script