trifectatechfoundation / sudo-rs

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

sudoers/@include: error out when encountering `%h` #740

Closed xy2i closed 1 year ago

xy2i commented 1 year ago

It looks like there's not much use of this feature, and implementing it adds complexity my making the interpretation of a sudoers file "dynamic" instead of "static".

Fixes #676

rnijveld commented 1 year ago

Could you rebase this on main? That should fix the CI issues! I'd prefer to take this variant of handling %h!

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 94.73% and project coverage change: +0.07% :tada:

Comparison is base (9a7f38f) 54.86% compared to head (af45280) 54.94%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #740 +/- ## ========================================== + Coverage 54.86% 54.94% +0.07% ========================================== Files 71 71 Lines 9731 9750 +19 ========================================== + Hits 5339 5357 +18 - Misses 4392 4393 +1 ``` | [Files Changed](https://app.codecov.io/gh/memorysafety/sudo-rs/pull/740?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/740?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=memorysafety#diff-c3JjL3N1ZG9lcnMvbW9kLnJz) | `73.91% <85.71%> (+0.14%)` | :arrow_up: | | [src/sudoers/test/mod.rs](https://app.codecov.io/gh/memorysafety/sudo-rs/pull/740?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=memorysafety#diff-c3JjL3N1ZG9lcnMvdGVzdC9tb2QucnM=) | `92.96% <100.00%> (+0.21%)` | :arrow_up: |

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