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

Miscellaneous refactoring #43

Merged
merged 6 commits into from
Dec 19, 2024
Merged

Miscellaneous refactoring #43

merged 6 commits into from
Dec 19, 2024

Conversation

MEhrn00
Copy link
Member

@MEhrn00 MEhrn00 commented Dec 19, 2024

Project refactoring to remove lint and compile warnings.

Changes

  • 0e93927 Adds else case in payload builder to satisfy pylint warning.
  • 0ef7f64 Removes custom cfg directive for profile conditional compilation.
  • c6ad959 Prefixes unused variables with an underscore to silence Rust compile warnings.
  • 11f45bc Adds error handling when reading the SELinux config in the getprivs command.
  • 9fbd60b Removes unused BrowserScript import from netstat.py.
  • 1c27d34 Changes doc comment in src/netstat.rs to be a regular inline comment.

Includes an else case when creating the output payload path for reading
to handle a build parameter output type that is unknown. This should
never happen since the build parameters are set above but this satisfies
a pylint error where the `payload_path` variable may be undefined.
Removes the conditional compilation `cfg(http)` flag for selecting the
http profile. This should be added back as a feature flag instead of a
Rust cfg flag when multiple profiles are supported.
Adds underscore prefixes to unused variables for to silence unused
variable warnings.
Adds error handling for reading the SELinux config in cases where the
file gets corrupted while it is being read.
@MEhrn00 MEhrn00 self-assigned this Dec 19, 2024
@MEhrn00 MEhrn00 marked this pull request as ready for review December 19, 2024 18:23
Changes comment in src/netstat.rs return statement to an inline comment
instead of a doc comment.
@MEhrn00 MEhrn00 merged commit 2810cbb into main Dec 19, 2024
3 of 4 checks passed
@MEhrn00 MEhrn00 deleted the qol-refactoring branch December 19, 2024 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant