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

pam/native-model: Do not render qr code in SSH sessions at all #545

Merged
merged 3 commits into from
Sep 20, 2024

Conversation

3v1n0
Copy link
Collaborator

@3v1n0 3v1n0 commented Sep 19, 2024

Do not renderer qrcode in SSH at all, the only clients supporting it are putty and ssh provided by ubuntu (>= 24.04), and it's not possible (yet) to detect this from PAM level, so let's just ignore it for now.

And add an integration test covering this case.

Closes: #497

UDENG-4279

Do not renderer qrcode in SSH at all, the only clients supporting it are putty
and `ssh` provided by ubuntu (>= 24.04), and it's not possible (yet) to detect
this from PAM level, so let's just ignore it for now.

And add an integration test covering this case

Closes: ubuntu#497
Only render it on terminal TTYs, as if the module gets loaded somewhere
else (polkit renderers, un-patched gdm, any other desktop greeter like
lightdm), it wouldn't work anyways.

So, just support it in the platforms we know it works instead
@3v1n0 3v1n0 requested a review from a team as a code owner September 19, 2024 13:04
@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 90.00000% with 2 lines in your changes missing coverage. Please review.

Project coverage is 84.61%. Comparing base (7921867) to head (ab7ab9d).

Files with missing lines Patch % Lines
pam/internal/adapter/utils.go 83.33% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #545   +/-   ##
=======================================
  Coverage   84.61%   84.61%           
=======================================
  Files          79       79           
  Lines        6953     6955    +2     
  Branches       75       75           
=======================================
+ Hits         5883     5885    +2     
- Misses        745      746    +1     
+ Partials      325      324    -1     

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

Copy link
Member

@denisonbarbosa denisonbarbosa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice one. Good job!

@3v1n0 3v1n0 merged commit 4946962 into ubuntu:main Sep 20, 2024
6 checks passed
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.

Issue: QR code does not render in Microsoft Terminal (Windows 11)
3 participants