trifectatechfoundation / sudo-rs

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

switch from `print!` macros to `write!` #738

Closed japaric closed 1 year ago

japaric commented 1 year ago

fixes #737

note that there is now a divergence between ogvisudo and visudo-rs. ogvisudo ignores IO errors when printing; as it is an interactive tool that results in confusing scenarios: for example, visudo | true does not print the prompt asking what to do next (press 'x', 'e', etc.) and then blocks waiting for user input. visudo-rs will early exit in the same scenario indicating that there's an IO error.

github-actions[bot] commented 1 year ago

Number of dependencies and binary size impact report

Metric main PR #738 Delta
Direct dependencies 3 3 -
Total dependencies 4 4 -
Binary size 1 MiB 1 MiB -
Text size 597.2 KiB 597.7 KiB -
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 has no change and project coverage change: +0.08% :tada:

Comparison is base (e83fc61) 54.78% compared to head (f82a8bf) 54.86%. Report is 12 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #738 +/- ## ========================================== + Coverage 54.78% 54.86% +0.08% ========================================== Files 71 71 Lines 9709 9731 +22 ========================================== + Hits 5319 5339 +20 - Misses 4390 4392 +2 ``` | [Files Changed](https://app.codecov.io/gh/memorysafety/sudo-rs/pull/738?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=memorysafety) | Coverage Δ | | |---|---|---| | [src/su/mod.rs](https://app.codecov.io/gh/memorysafety/sudo-rs/pull/738?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=memorysafety#diff-c3JjL3N1L21vZC5ycw==) | `0.00% <0.00%> (ø)` | | | [src/sudo/diagnostic.rs](https://app.codecov.io/gh/memorysafety/sudo-rs/pull/738?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=memorysafety#diff-c3JjL3N1ZG8vZGlhZ25vc3RpYy5ycw==) | `0.00% <0.00%> (ø)` | | | [src/sudo/mod.rs](https://app.codecov.io/gh/memorysafety/sudo-rs/pull/738?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=memorysafety#diff-c3JjL3N1ZG8vbW9kLnJz) | `0.00% <0.00%> (ø)` | | | [src/sudo/pipeline/list.rs](https://app.codecov.io/gh/memorysafety/sudo-rs/pull/738?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=memorysafety#diff-c3JjL3N1ZG8vcGlwZWxpbmUvbGlzdC5ycw==) | `0.00% <0.00%> (ø)` | | | [src/visudo/mod.rs](https://app.codecov.io/gh/memorysafety/sudo-rs/pull/738?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 [6 files with indirect coverage changes](https://app.codecov.io/gh/memorysafety/sudo-rs/pull/738/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: Have feedback on the report? Share it here.