Skip to content
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

Improve Linux OS detection #809

Merged
merged 10 commits into from
Sep 3, 2024
Merged

Improve Linux OS detection #809

merged 10 commits into from
Sep 3, 2024

Conversation

Horofic
Copy link
Contributor

@Horofic Horofic commented Aug 7, 2024

Fixes #807

Copy link

codecov bot commented Aug 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 75.51%. Comparing base (95f27ae) to head (71e4a80).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #809   +/-   ##
=======================================
  Coverage   75.51%   75.51%           
=======================================
  Files         305      305           
  Lines       26348    26348           
=======================================
  Hits        19897    19897           
  Misses       6451     6451           
Flag Coverage Δ
unittests 75.51% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Horofic Horofic requested a review from Schamper August 7, 2024 15:12
@Horofic Horofic requested a review from JSCU-CNI August 13, 2024 09:02
dissect/target/plugins/os/unix/linux/_os.py Outdated Show resolved Hide resolved
@Horofic Horofic requested a review from JSCU-CNI August 13, 2024 11:22
@Horofic Horofic requested review from Schamper and removed request for Schamper August 14, 2024 10:53
@Horofic Horofic added the core Related to a core component of dissect.target label Aug 15, 2024
@Schamper Schamper changed the title Improve LinuxPlugin OS detection Improve Linux OS detection Aug 28, 2024
@Schamper
Copy link
Member

What about this? This also finally fixes the problem that if you run the local loader with the incorrect permissions, it will wrongly select FreeBSD as the OS with /proc as the root filesystem because /proc/net exists.

@Horofic Horofic merged commit 38c0145 into main Sep 3, 2024
18 checks passed
@Horofic Horofic deleted the fix_linux_classification branch September 3, 2024 11:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Related to a core component of dissect.target
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Windows targets get incorrectly classified as Linux targets
3 participants