trifectatechfoundation / sudo-rs

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

Add CLI for `visudo` #670

Closed pvdrz closed 1 year ago

pvdrz commented 1 year ago

Describe the changes done on this pull request This PR adds a new CLI argument parser for visudo and implements some basic flags.

Pull Request Checklist

github-actions[bot] commented 1 year ago

Number of dependencies and binary size impact report

Metric main PR #670 Delta
Direct dependencies 3 3 -
Total dependencies 4 4 -
Binary size 992.2 KiB 988.1 KiB -0.4%
Text size 577.1 KiB 576.5 KiB -0.1%
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 has no change and project coverage change: -0.59 :warning:

Comparison is base (3e0844b) 58.45% compared to head (df63852) 57.86%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #670 +/- ## ========================================== - Coverage 58.45% 57.86% -0.59% ========================================== Files 66 68 +2 Lines 8850 8941 +91 ========================================== + Hits 5173 5174 +1 - Misses 3677 3767 +90 ``` | [Impacted Files](https://app.codecov.io/gh/memorysafety/sudo-rs/pull/670?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=memorysafety) | Coverage Δ | | |---|---|---| | [src/visudo/cli.rs](https://app.codecov.io/gh/memorysafety/sudo-rs/pull/670?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=memorysafety#diff-c3JjL3Zpc3Vkby9jbGkucnM=) | `0.00% <0.00%> (ø)` | | | [src/visudo/help.rs](https://app.codecov.io/gh/memorysafety/sudo-rs/pull/670?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=memorysafety#diff-c3JjL3Zpc3Vkby9oZWxwLnJz) | `0.00% <0.00%> (ø)` | | | [src/visudo/mod.rs](https://app.codecov.io/gh/memorysafety/sudo-rs/pull/670?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%> (ø)` | | ... and [1 file with indirect coverage changes](https://app.codecov.io/gh/memorysafety/sudo-rs/pull/670/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.