-
Notifications
You must be signed in to change notification settings - Fork 103
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
ENT-9931: Guard against /sys/hypervisor/uuid not being readable (3.18) #2718
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -603,6 +603,15 @@ bundle common cfe_autorun_inventory_aws | |
scope => "namespace", | ||
if => isvariable("cfe_autorun_inventory_dmidecode.dmi[bios-vendor]"); | ||
|
||
@if minimum_version(3.22.0) | ||
"sys_hypervisor_uuid_readable" -> { "ENT-9931" } | ||
expression => isreadable("/sys/hypervisor/uuid", 1); | ||
@else | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yay else There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yep, I considered adding a comment like "this could be dangerous, with |
||
"sys_hypervisor_uuid_readable" -> { "ENT-9931" } | ||
expression => returnszero("${paths.cat} /sys/hypervisor/uuid 2>/dev/null", "useshell"); | ||
@endif | ||
|
||
!disable_inventory_aws.sys_hypervisor_uuid_readable:: | ||
"ec2_instance" -> { "CFE-2924" } | ||
expression => regline( "^ec2.*", "/sys/hypervisor/uuid" ), | ||
scope => "namespace", | ||
|
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.
Do we have a feature registered for the function? Would be nice to be able to so if feature isreadable.