trifectatechfoundation / sudo-rs

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

Parse `env_editor` sudoers default #697

Closed pvdrz closed 1 year ago

pvdrz commented 1 year ago

Describe the changes done on this pull request This PR updates the sudoers format parser to support the env_editor by default. It also updates visudo so it uses this variable correctly.

Pull Request Checklist

github-actions[bot] commented 1 year ago

Number of dependencies and binary size impact report

Metric main PR #697 Delta
Direct dependencies 3 3 -
Total dependencies 4 4 -
Binary size 996.7 KiB 996.7 KiB -
Text size 580 KiB 580 KiB -
Dependencies diff ```diff └─ sudo-rs [v0.2.0-dev.20230711] ├─ glob [v0.3.1] ├─ libc [v0.2.147] └─ log [v0.4.19] ```
codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 14.28% and project coverage change: -0.03 :warning:

Comparison is base (911d161) 57.42% compared to head (6372fdc) 57.39%.

:exclamation: Current head 6372fdc differs from pull request most recent head 23bed63. Consider uploading reports for the commit 23bed63 to get more accurate results

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #697 +/- ## ========================================== - Coverage 57.42% 57.39% -0.03% ========================================== Files 68 68 Lines 9076 9091 +15 ========================================== + Hits 5212 5218 +6 - Misses 3864 3873 +9 ``` | [Impacted Files](https://app.codecov.io/gh/memorysafety/sudo-rs/pull/697?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=memorysafety) | Coverage Δ | | |---|---|---| | [src/sudoers/mod.rs](https://app.codecov.io/gh/memorysafety/sudo-rs/pull/697?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=memorysafety#diff-c3JjL3N1ZG9lcnMvbW9kLnJz) | `88.57% <0.00%> (-0.59%)` | :arrow_down: | | [src/visudo/mod.rs](https://app.codecov.io/gh/memorysafety/sudo-rs/pull/697?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=memorysafety#diff-c3JjL3Zpc3Vkby9tb2QucnM=) | `0.00% <0.00%> (ø)` | | | [src/defaults/mod.rs](https://app.codecov.io/gh/memorysafety/sudo-rs/pull/697?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=memorysafety#diff-c3JjL2RlZmF1bHRzL21vZC5ycw==) | `91.17% <100.00%> (+0.26%)` | :arrow_up: | | [src/sudoers/test/mod.rs](https://app.codecov.io/gh/memorysafety/sudo-rs/pull/697?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=memorysafety#diff-c3JjL3N1ZG9lcnMvdGVzdC9tb2QucnM=) | `98.33% <100.00%> (+<0.01%)` | :arrow_up: | ... and [1 file with indirect coverage changes](https://app.codecov.io/gh/memorysafety/sudo-rs/pull/697/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.