Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make sudo -l print sudoers entries #720

Merged
merged 7 commits into from
Jul 28, 2023
Merged

make sudo -l print sudoers entries #720

merged 7 commits into from
Jul 28, 2023

Conversation

japaric
Copy link
Collaborator

@japaric japaric commented Jul 27, 2023

best reviewed commit by commit
closes #710

when printing a sudoers entry we need to distinguish between
- neither NOPASSWD or PASSWD is present (None)
- NOPASSWD is present (Some(false))
- PASSWD is present (Some(true))
@github-actions
Copy link

github-actions bot commented Jul 27, 2023

Number of dependencies and binary size impact report

Metric main PR #720 Delta
Direct dependencies 3 3 -
Total dependencies 4 4 -
Binary size 1003.7 KiB 1009.3 KiB +0.6%
Text size 586.5 KiB 591.1 KiB +0.8%
Dependencies diff
 └─ sudo-rs [v0.2.0-dev.20230711]
    ├─ glob [v0.3.1]
    ├─ libc [v0.2.147]
    └─ log [v0.4.19]

@codecov
Copy link

codecov bot commented Jul 27, 2023

Codecov Report

Patch coverage: 12.13% and project coverage change: -1.01% ⚠️

Comparison is base (522fcf5) 55.87% compared to head (c4b54f2) 54.86%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #720      +/-   ##
==========================================
- Coverage   55.87%   54.86%   -1.01%     
==========================================
  Files          69       70       +1     
  Lines        9369     9545     +176     
==========================================
+ Hits         5235     5237       +2     
- Misses       4134     4308     +174     
Files Changed Coverage Δ
src/sudo/pipeline/list.rs 0.00% <0.00%> (ø)
src/sudoers/entry.rs 0.00% <0.00%> (ø)
src/sudoers/mod.rs 71.45% <1.75%> (-7.57%) ⬇️
src/sudoers/tokens.rs 96.31% <50.00%> (-0.62%) ⬇️
src/sudoers/ast.rs 85.84% <100.00%> (+0.13%) ⬆️
src/sudoers/policy.rs 76.92% <100.00%> (ø)
src/sudoers/test/mod.rs 98.33% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

src/sudoers/ast.rs Show resolved Hide resolved
src/sudoers/entry.rs Show resolved Hide resolved
src/sudoers/entry.rs Show resolved Hide resolved
src/sudoers/mod.rs Show resolved Hide resolved
src/sudoers/mod.rs Outdated Show resolved Hide resolved
so that we don't have the default in several places which could result
in forgetting to update one of the copies
@japaric japaric enabled auto-merge July 28, 2023 12:01
@japaric japaric mentioned this pull request Jul 28, 2023
@japaric japaric added this pull request to the merge queue Jul 28, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Jul 28, 2023
@pvdrz pvdrz added this pull request to the merge queue Jul 28, 2023
Merged via the queue into main with commit b5e96e8 Jul 28, 2023
14 checks passed
@pvdrz pvdrz deleted the impl-sudo-lister branch July 28, 2023 20:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

sudo --list: print sudoers policies
2 participants