trifectatechfoundation / sudo-rs

A memory safe implementation of sudo and su.
Other
2.9k stars 79 forks source link

Simplify signal formatting #650

Closed pvdrz closed 1 year ago

pvdrz commented 1 year ago

Describe the changes done on this pull request This PR removes some code duplication that formats signals in logs.

Pull Request Checklist

github-actions[bot] commented 1 year ago

Number of dependencies and binary size impact report

Metric main PR #650 Delta
Direct dependencies 3 3 -
Total dependencies 4 4 -
Binary size 978.9 KiB 978.5 KiB -
Text size 568.3 KiB 570.7 KiB +0.4%
Dependencies diff ```diff └─ sudo-rs [v0.2.0-dev.20230703] ├─ glob [v0.3.1] ├─ libc [v0.2.147] └─ log [v0.4.19] ```
codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 42.85% and project coverage change: +0.06 :tada:

Comparison is base (b56edf5) 85.79% compared to head (43d4666) 85.86%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #650 +/- ## ========================================== + Coverage 85.79% 85.86% +0.06% ========================================== Files 64 64 Lines 8687 8678 -9 ========================================== - Hits 7453 7451 -2 + Misses 1234 1227 -7 ``` | [Impacted Files](https://app.codecov.io/gh/memorysafety/sudo-rs/pull/650?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=memorysafety) | Coverage Δ | | |---|---|---| | [src/system/signal/handler.rs](https://app.codecov.io/gh/memorysafety/sudo-rs/pull/650?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=memorysafety#diff-c3JjL3N5c3RlbS9zaWduYWwvaGFuZGxlci5ycw==) | `77.77% <0.00%> (+5.36%)` | :arrow_up: | | [src/system/signal/stream.rs](https://app.codecov.io/gh/memorysafety/sudo-rs/pull/650?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=memorysafety#diff-c3JjL3N5c3RlbS9zaWduYWwvc3RyZWFtLnJz) | `78.26% <0.00%> (ø)` | | | [src/system/wait.rs](https://app.codecov.io/gh/memorysafety/sudo-rs/pull/650?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=memorysafety#diff-c3JjL3N5c3RlbS93YWl0LnJz) | `91.14% <0.00%> (+3.64%)` | :arrow_up: | | [src/exec/mod.rs](https://app.codecov.io/gh/memorysafety/sudo-rs/pull/650?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=memorysafety#diff-c3JjL2V4ZWMvbW9kLnJz) | `87.03% <66.66%> (-2.69%)` | :arrow_down: | | [src/system/signal/mod.rs](https://app.codecov.io/gh/memorysafety/sudo-rs/pull/650?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=memorysafety#diff-c3JjL3N5c3RlbS9zaWduYWwvbW9kLnJz) | `80.00% <66.66%> (ø)` | | ... and [2 files with indirect coverage changes](https://app.codecov.io/gh/memorysafety/sudo-rs/pull/650/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=memorysafety)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.