sudo-rs icon indicating copy to clipboard operation
sudo-rs copied to clipboard

compliance tests: password authentication via tty

Open japaric opened this issue 2 years ago • 2 comments

this PR adds the sshpass program to the docker images and uses it to emulate TTY input. this way we can test password authentication without the -S flag. 3 tests related to tty-based password auth has been added and one existing test that required password auth has been changed from using the --stdin flag to using sshpass to make it pass with sudo-rs

this PR is built on top of PR #103

japaric avatar Mar 16 '23 17:03 japaric

Codecov Report

Patch and project coverage have no change.

Comparison is base (9e50e74) 74.45% compared to head (0abf23c) 74.45%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #109   +/-   ##
=======================================
  Coverage   74.45%   74.45%           
=======================================
  Files          42       42           
  Lines        5335     5335           
=======================================
  Hits         3972     3972           
  Misses       1363     1363           

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

codecov-commenter avatar Mar 16 '23 18:03 codecov-commenter

I've rebased the PR. the tests are flaky when using sudo-rs so this will remain in draft form for the time being.

japaric avatar Mar 29 '23 17:03 japaric

Number of dependencies and binary size impact report

Metric main PR #109 Delta
Direct dependencies 8 8 -
Total dependencies 85 85 -
Binary size 988.2 KiB 988.9 KiB -
Text size 565.2 KiB 566.3 KiB +0.2%
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]
    |     ├─ 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]

github-actions[bot] avatar May 31 '23 16:05 github-actions[bot]

Rebased on the current main to try to work the problem with the merge queue CI.

squell avatar Jun 05 '23 08:06 squell