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

interfaces: add pcscd interface #12847

Merged
merged 2 commits into from Jun 20, 2023
Merged

interfaces: add pcscd interface #12847

merged 2 commits into from Jun 20, 2023

Conversation

nteodosio
Copy link
Contributor

To access smart cards under a snapped program (bug 1843392), we need to allow it to communicate with the reader drivers via the pcscd socket.

This has already been discussed with the security team as the comment #1 in the linked bug report describes.

To create this interface I simply copied jack1.go and changed the appropriate parts.

@codecov-commenter
Copy link

codecov-commenter commented May 24, 2023

Codecov Report

Merging #12847 (f99442c) into master (803c868) will increase coverage by 0.02%.
The diff coverage is 100.00%.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

@@            Coverage Diff             @@
##           master   #12847      +/-   ##
==========================================
+ Coverage   78.59%   78.62%   +0.02%     
==========================================
  Files         990      992       +2     
  Lines      122664   122821     +157     
==========================================
+ Hits        96410    96568     +158     
+ Misses      20184    20182       -2     
- Partials     6070     6071       +1     
Flag Coverage Δ
unittests 78.62% <100.00%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
interfaces/builtin/pcscd.go 100.00% <100.00%> (ø)

... and 15 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Collaborator

@alexmurray alexmurray left a comment

Choose a reason for hiding this comment

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

LGTM for the simple purpose of this interface.

@alexmurray alexmurray added Needs security review Can only be merged once security gave a :+1: and removed Needs security review Can only be merged once security gave a :+1: labels May 30, 2023
@mvo5 mvo5 changed the title interfaces: Add pcscd interface interfaces: add pcscd interface Jun 5, 2023
@mvo5 mvo5 requested a review from pedronis June 5, 2023 08:35
@mvo5 mvo5 added the Needs Samuele review Needs a review from Samuele before it can land label Jun 5, 2023
Copy link
Contributor

@mvo5 mvo5 left a comment

Choose a reason for hiding this comment

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

This looks good but needs a quick double check from Samuele for awareness and for ensuring the naming is consistent.

Copy link
Collaborator

@pedronis pedronis left a comment

Choose a reason for hiding this comment

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

the name seems fine, comment about the summary

package builtin

const pcscdSummary = `allows access to socket for communication between
PS/SC API library and PCSCD daemon.`
Copy link
Collaborator

Choose a reason for hiding this comment

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

this should probably be more something like:

allows interacting with PCSD daemon (e.g. for the PS/SC API library)

@mvo5 mvo5 added the Squash-merge Please squash this PR when merging. label Jun 5, 2023
Copy link
Contributor

@mvo5 mvo5 left a comment

Choose a reason for hiding this comment

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

Thanks, but please consider updating the summary as Samuele suggested.

@nteodosio
Copy link
Contributor Author

Thanks for the suggestion, I incorporated the proposed change.

@mvo5 mvo5 merged commit 690706f into snapcore:master Jun 20, 2023
36 of 50 checks passed
alexmurray pushed a commit to alexmurray/snapd that referenced this pull request Oct 17, 2023
* interfaces: Add pcscd interface

* Add high-level test for interface 'pcscd'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Samuele review Needs a review from Samuele before it can land Squash-merge Please squash this PR when merging.
Projects
None yet
5 participants