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

Reimplement sudo-exec #363

Closed
wants to merge 11 commits into from
Closed

Reimplement sudo-exec #363

wants to merge 11 commits into from

Conversation

pvdrz
Copy link
Collaborator

@pvdrz pvdrz commented May 25, 2023

Even though this PR fixes some of the shortcomings of the current sudo-exec crate, the size of it is quite extensive, making it challenging to review.

I think it would be better to break down this PR into smaller, more manageable PRs. With that in mind, I consider we should leave this PR open in draft status as a reference meanwhile.

@github-actions
Copy link

github-actions bot commented May 25, 2023

Number of dependencies and binary size impact report

Metric main PR #363 Delta
Direct dependencies 8 8 -
Total dependencies 85 87 +2.4%
Binary size 989 KiB 1 MiB +8.2%
Text size 566.2 KiB 609.6 KiB +7.7%
Dependencies diff
 └─ sudo [v0.1.0-alpha.1]
    ├─ sudo-cli [v0.1.0-alpha.1]
    ├─ sudo-common [v0.1.0-alpha.1]
    |  ├─ libc [v0.2.144]
    |  ├─ sudo-cli [v0.1.0-alpha.1]
    |  ├─ sudo-pam [v0.1.0-alpha.1]
    |  |  ├─ libc [v0.2.144]
    |  |  ├─ sudo-cutils [v0.1.0-alpha.1]
    |  |  |  └─ libc [v0.2.144]
    |  |  └─ sudo-pam-sys [v0.1.0-alpha.1]
    |  |     ├─ libc [v0.2.144]
    |  |     └─ bindgen [v0.63.0]
    |  |        ├─ bitflags [v1.3.2]
    |  |        ├─ cexpr [v0.6.0]
    |  |        |  └─ nom [v7.1.3]
    |  |        |     ├─ memchr [v2.5.0]
    |  |        |     └─ minimal-lexical [v0.2.1]
    |  |        ├─ clang-sys [v1.6.1]
    |  |        |  ├─ glob [v0.3.1]
    |  |        |  ├─ libc [v0.2.144]
    |  |        |  ├─ libloading [v0.7.4]
    |  |        |  |  └─ cfg-if [v1.0.0]
    |  |        |  └─ glob [v0.3.1]
    |  |        ├─ lazy_static [v1.4.0]
    |  |        ├─ lazycell [v1.3.0]
    |  |        ├─ log [v0.4.17]
    |  |        |  └─ cfg-if [v1.0.0]
    |  |        ├─ peeking_take_while [v0.1.2]
    |  |        ├─ proc-macro2 [v1.0.57]
    |  |        |  └─ unicode-ident [v1.0.8]
    |  |        ├─ quote [v1.0.27]
    |  |        |  └─ proc-macro2 [v1.0.57]
    |  |        ├─ regex [v1.8.1]
    |  |        |  └─ regex-syntax [v0.7.1]
    |  |        ├─ rustc-hash [v1.1.0]
    |  |        ├─ shlex [v1.1.0]
    |  |        ├─ syn [v1.0.109]
    |  |        |  ├─ proc-macro2 [v1.0.57]
    |  |        |  ├─ quote [v1.0.27]
    |  |        |  └─ unicode-ident [v1.0.8]
    |  |        └─ which [v4.4.0]
    |  |           ├─ either [v1.8.1]
    |  |           └─ libc [v0.2.144]
    |  └─ sudo-system [v0.1.0-alpha.1]
    |     ├─ libc [v0.2.144]
 
+    |     ├─ signal-hook [v0.3.15]
+    |     |  ├─ libc [v0.2.144]
+    |     |  ├─ signal-hook-registry [v1.4.1]
+    |     |  |  └─ libc [v0.2.144]
+    |     |  └─ cc [v1.0.79]
+    |     ├─ signal-hook-registry [v1.4.1]
+ 
    |     ├─ sudo-cutils [v0.1.0-alpha.1]
    |     └─ sudo-log [v0.1.0-alpha.1]
    |        ├─ env_logger [v0.9.3]
    |        |  └─ log [v0.4.17]
    |        |     └─ cfg-if [v1.0.0]
    |        ├─ log [v0.4.17]
    |        └─ syslog [v6.1.0]
    |           ├─ error-chain [v0.12.4]
    |           |  └─ version_check [v0.9.4]
    |           ├─ hostname [v0.3.1]
    |           |  ├─ libc [v0.2.144]
    |           |  └─ match_cfg [v0.1.0]
    |           ├─ libc [v0.2.144]
    |           ├─ log [v0.4.17]
    |           └─ time [v0.3.21]
    |              ├─ itoa [v1.0.6]
    |              ├─ libc [v0.2.144]
    |              ├─ num_threads [v0.1.6]
    |              └─ time-core [v0.1.1]
    ├─ sudo-env [v0.1.0-alpha.1]
    |  ├─ sudo-common [v0.1.0-alpha.1]
    |  ├─ sudo-system [v0.1.0-alpha.1]
    |  └─ sudoers [v0.1.0-alpha.1]
    |     ├─ glob [v0.3.1]
    |     ├─ sudo-defaults [v0.1.0-alpha.1]
    |     ├─ sudo-log [v0.1.0-alpha.1]
    |     └─ sudo-system [v0.1.0-alpha.1]
    ├─ sudo-exec [v0.1.0-alpha.1]
    |  ├─ signal-hook [v0.3.15]
 
-    |  |  ├─ libc [v0.2.144]
-    |  |  ├─ signal-hook-registry [v1.4.1]
-    |  |  |  └─ libc [v0.2.144]
-    |  |  └─ cc [v1.0.79]
- 
    |  ├─ sudo-common [v0.1.0-alpha.1]
    |  ├─ sudo-log [v0.1.0-alpha.1]
    |  └─ sudo-system [v0.1.0-alpha.1]
    ├─ sudo-log [v0.1.0-alpha.1]
    ├─ sudo-pam [v0.1.0-alpha.1]
    ├─ sudo-system [v0.1.0-alpha.1]
    └─ sudoers [v0.1.0-alpha.1]

@codecov
Copy link

codecov bot commented May 25, 2023

Codecov Report

Patch coverage has no change and project coverage change: +0.08 🎉

Comparison is base (affd48c) 74.55% compared to head (431f050) 74.64%.

❗ Current head 431f050 differs from pull request most recent head ed07e90. Consider uploading reports for the commit ed07e90 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #363      +/-   ##
==========================================
+ Coverage   74.55%   74.64%   +0.08%     
==========================================
  Files          42       39       -3     
  Lines        5325     4898     -427     
==========================================
- Hits         3970     3656     -314     
+ Misses       1355     1242     -113     
Impacted Files Coverage Δ
lib/sudo-exec/src/lib.rs 1.20% <ø> (ø)
lib/sudo-exec/src/monitor.rs 0.00% <0.00%> (ø)
lib/sudo-system/src/lib.rs 71.42% <0.00%> (-0.72%) ⬇️

... and 14 files with indirect coverage changes

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

@pvdrz pvdrz changed the title Set the command's group as the tty foreground group Reimplement sudo-exec Jun 1, 2023
@pvdrz
Copy link
Collaborator Author

pvdrz commented Jun 22, 2023

Closed in favor of #520 and friends

@pvdrz pvdrz closed this Jun 22, 2023
@pvdrz pvdrz deleted the fix-sigtstp branch June 22, 2023 13:59
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.

1 participant