trifectatechfoundation / sudo-rs

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

Papercut fix: null bytes starting whitespace in sudoers files #751

Closed squell closed 1 year ago

squell commented 1 year ago

This is perhaps best reviewed commit by commit.

github-actions[bot] commented 1 year ago

Number of dependencies and binary size impact report

Metric main PR #751 Delta
Direct dependencies 3 3 -
Total dependencies 4 4 -
Binary size 1 MiB 1023.9 KiB -0.5%
Text size 597.6 KiB 593.6 KiB -0.7%
Dependencies diff ```diff └─ sudo-rs [v0.2.0] ├─ glob [v0.3.1] ├─ libc [v0.2.147] └─ log [v0.4.20] ```
codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.02% :tada:

Comparison is base (0ac6fa8) 54.86% compared to head (aaf4b7d) 54.88%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #751 +/- ## ========================================== + Coverage 54.86% 54.88% +0.02% ========================================== Files 71 71 Lines 9731 9736 +5 ========================================== + Hits 5339 5344 +5 Misses 4392 4392 ``` | [Files Changed](https://app.codecov.io/gh/memorysafety/sudo-rs/pull/751?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=memorysafety) | Coverage Δ | | |---|---|---| | [src/sudoers/tokens.rs](https://app.codecov.io/gh/memorysafety/sudo-rs/pull/751?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=memorysafety#diff-c3JjL3N1ZG9lcnMvdG9rZW5zLnJz) | `96.42% <ø> (ø)` | | | [src/sudoers/ast.rs](https://app.codecov.io/gh/memorysafety/sudo-rs/pull/751?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=memorysafety#diff-c3JjL3N1ZG9lcnMvYXN0LnJz) | `82.76% <100.00%> (ø)` | | | [src/sudoers/basic\_parser.rs](https://app.codecov.io/gh/memorysafety/sudo-rs/pull/751?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=memorysafety#diff-c3JjL3N1ZG9lcnMvYmFzaWNfcGFyc2VyLnJz) | `94.73% <100.00%> (+0.02%)` | :arrow_up: | | [src/sudoers/test/mod.rs](https://app.codecov.io/gh/memorysafety/sudo-rs/pull/751?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=memorysafety#diff-c3JjL3N1ZG9lcnMvdGVzdC9tb2QucnM=) | `92.82% <100.00%> (+0.07%)` | :arrow_up: |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.