trifectatechfoundation / sudo-rs

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

Implement `--owner` and `--perms` #689

Closed pvdrz closed 1 year ago

pvdrz commented 1 year ago

Describe the changes done on this pull request This PR adds the required logic to implement the --owner/-O and --perms/-P flags for visudo.

Pull Request Checklist

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage has no change and project coverage change: -0.19 :warning:

Comparison is base (e1dff57) 57.66% compared to head (7efb68d) 57.48%.

:exclamation: Current head 7efb68d differs from pull request most recent head 5b89978. Consider uploading reports for the commit 5b89978 to get more accurate results

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #689 +/- ## ========================================== - Coverage 57.66% 57.48% -0.19% ========================================== Files 68 69 +1 Lines 8960 8985 +25 ========================================== - Hits 5167 5165 -2 - Misses 3793 3820 +27 ``` | [Impacted Files](https://app.codecov.io/gh/memorysafety/sudo-rs/pull/689?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=memorysafety) | Coverage Δ | | |---|---|---| | [src/system/file/chown.rs](https://app.codecov.io/gh/memorysafety/sudo-rs/pull/689?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=memorysafety#diff-c3JjL3N5c3RlbS9maWxlL2Nob3duLnJz) | `0.00% <0.00%> (ø)` | | | [src/system/file/lock.rs](https://app.codecov.io/gh/memorysafety/sudo-rs/pull/689?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=memorysafety#diff-c3JjL3N5c3RlbS9maWxlL2xvY2sucnM=) | `77.04% <ø> (ø)` | | | [src/system/mod.rs](https://app.codecov.io/gh/memorysafety/sudo-rs/pull/689?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=memorysafety#diff-c3JjL3N5c3RlbS9tb2QucnM=) | `82.05% <0.00%> (-0.83%)` | :arrow_down: | | [src/visudo/cli.rs](https://app.codecov.io/gh/memorysafety/sudo-rs/pull/689?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/mod.rs](https://app.codecov.io/gh/memorysafety/sudo-rs/pull/689?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%> (ø)` | |

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

github-actions[bot] commented 1 year ago

Number of dependencies and binary size impact report

Metric main PR #689 Delta
Direct dependencies 3 3 -
Total dependencies 4 4 -
Binary size 996.5 KiB 996.6 KiB -
Text size 580.6 KiB 580.3 KiB -
Dependencies diff ```diff └─ sudo-rs [v0.2.0-dev.20230711] ├─ glob [v0.3.1] ├─ libc [v0.2.147] └─ log [v0.4.19] ```