-
Notifications
You must be signed in to change notification settings - Fork 164
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(scap): move machine/agent info to generic platform #1204
Conversation
cc @incertum |
5b57b65
to
cfcc98b
Compare
also cc @geraldcombs since you seem to be involved with the non-Linux side of things :) |
8db5e54
to
1b06b7d
Compare
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.
LGTM label has been added. Git tree hash: e4a29cd7f6d0b6da8bcf5b9dd1de73fc496ea05e
|
{ | ||
OSVERSIONINFOA os_info; | ||
os_info.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); | ||
if(GetVersionExA(&os_info)) |
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.
Note that this probably won't return the correct version on modern versions of Windows. We use RtlGetVersion in Wireshark, but it looks like you can also call GetFileVersionInfo on one of the kernel DLLs.
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.
I'm happy it compiled without me seeing a Windows machine ;) I'm even happier to replace it with something that actually works.
For future me: https://github.com/wireshark/wireshark/blob/dcc9cbffefe0598eadec11cbc1869943a26219c5/wsutil/os_version_info.c#L192
(I don't think we need anything that fancy but I'll use it for inspiration ;])
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.
@geraldcombs and @gnosek is this a blocker or a note for a future PR? The primary fix this PR addresses is around plugins and linux ...
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.
@incertum I think this falls in the "future PR" category.
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.
@gnosek I'll re-approve tomorrow as we need a rebase now!
/milestone 0.12.0 |
Signed-off-by: Grzegorz Nosek <grzegorz.nosek@sysdig.com>
Signed-off-by: Grzegorz Nosek <grzegorz.nosek@sysdig.com>
Signed-off-by: Grzegorz Nosek <grzegorz.nosek@sysdig.com>
Signed-off-by: Grzegorz Nosek <grzegorz.nosek@sysdig.com>
This still needs macOS and Windows support Signed-off-by: Grzegorz Nosek <grzegorz.nosek@sysdig.com>
Signed-off-by: Grzegorz Nosek <grzegorz.nosek@sysdig.com>
1b06b7d
to
a59592c
Compare
@incertum, rebased. @geraldcombs, I did a yolo implementation using RtlGetVersion, please take a look if you can :) (taken from Wireshark, simplified a lot with less detail) |
Signed-off-by: Grzegorz Nosek <grzegorz.nosek@sysdig.com>
The generic platform handles machine_info now. Signed-off-by: Grzegorz Nosek <grzegorz.nosek@sysdig.com>
a59592c
to
5613af1
Compare
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: 76b7e2955e38508dbd2c75ce9865bfd7ca7e1747
|
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
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: FedeDP, gnosek, incertum 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 |
/kind bug
Any specific area of the project related to this PR?
/area build
/area libscap
What this PR does / why we need it:
The generic platform didn't expose machine_info or agent_info, while we do need this even for source plugins.
Also, allow source plugins to use the live platform (for upcoming syscall plugins).
Special notes for your reviewer:
macOS and Windows support is completely untested, fingers crossed for the CI doing its job.
Does this PR introduce a user-facing change?: