-
Notifications
You must be signed in to change notification settings - Fork 912
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
new(falco): add more version fields to --support and --version #2325
new(falco): add more version fields to --support and --version #2325
Conversation
…iver_version, libs_version to support Signed-off-by: Luca Guerra <[email protected]>
Signed-off-by: Luca Guerra <[email protected]>
/milestone 0.34.0 👍 |
auto driver_api_version = s->get_scap_api_version(); | ||
unsigned long driver_api_major = PPM_API_VERSION_MAJOR(driver_api_version); | ||
unsigned long driver_api_minor = PPM_API_VERSION_MINOR(driver_api_version); | ||
unsigned long driver_api_patch = PPM_API_VERSION_PATCH(driver_api_version); | ||
snprintf(driver_api_version_string, sizeof(driver_api_version_string), "%lu.%lu.%lu", driver_api_major, driver_api_minor, driver_api_patch); | ||
|
||
support["driver_api_version"] = driver_api_version_string; | ||
|
||
auto driver_schema_version = s->get_scap_schema_version(); | ||
unsigned long driver_schema_major = PPM_API_VERSION_MAJOR(driver_schema_version); | ||
unsigned long driver_schema_minor = PPM_API_VERSION_MINOR(driver_schema_version); | ||
unsigned long driver_schema_patch = PPM_API_VERSION_PATCH(driver_schema_version); | ||
snprintf(driver_schema_version_string, sizeof(driver_schema_version_string), "%lu.%lu.%lu", driver_schema_major, driver_schema_minor, driver_schema_patch); |
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.
it would be amazing if we had a sinsp API to do that instead of using low levels macro, but we can do that in a next step :)
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.
Completely agree, since I wrote this when libs 0.10.0 was already about to be released I didn't want to add an API dependency right now, as harmless as it may be.
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.
/approve
LGTM label has been added. Git tree hash: f606f033c6631b6a5dab27791331e04dde0ca990
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Andreagit97, leogr, LucaGuerra The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What type of PR is this?
/kind feature
Any specific area of the project related to this PR?
/area engine
What this PR does / why we need it:
Since a few Falco versions we have fields indicating libs, drivers, plugin APIs and so forth. These should be reflected into the
--support
option of Falco. In addition, the--version
command should contain the engine version as well in my opinion since users may want to easily check whether a rule file is compatible with their version of Falco without necessarily running against it.Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?: