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

Ignore sockets when loading keys #102

Merged
merged 6 commits into from Oct 15, 2021
Merged

Ignore sockets when loading keys #102

merged 6 commits into from Oct 15, 2021

Conversation

Matir
Copy link
Contributor

@Matir Matir commented Oct 14, 2021

If a user uses ControlMaster in OpenSSH, UNIX sockets often appear in their ~/.ssh directory. These fail loading as a key. This skips those sockets in the filesystem.

Fixes #101.

If a user uses ControlMaster in OpenSSH, UNIX sockets often appear in their ~/.ssh directory.  These fail loading as a key.  This skips those sockets in the filesystem.

Fixes slok#101.
@Matir Matir requested a review from slok as a code owner October 14, 2021 19:54
Like 9361f0e, but handle a symlink pointing to a socket.

Fixes slok#101.
@codecov-commenter
Copy link

codecov-commenter commented Oct 15, 2021

Codecov Report

Merging #102 (0aea289) into main (bfaa7d1) will decrease coverage by 0.42%.
The diff coverage is 42.85%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #102      +/-   ##
==========================================
- Coverage   80.92%   80.49%   -0.43%     
==========================================
  Files          16       16              
  Lines        1227     1241      +14     
==========================================
+ Hits          993      999       +6     
- Misses        173      179       +6     
- Partials       61       63       +2     
Impacted Files Coverage Δ
internal/storage/fs/key.go 67.46% <42.85%> (-3.08%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bfaa7d1...0aea289. Read the comment docs.

internal/storage/fs/key.go Outdated Show resolved Hide resolved
slok and others added 3 commits October 15, 2021 08:25
Copy link
Owner

@slok slok left a comment

Choose a reason for hiding this comment

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

Hey @Matir! Thanks for the contribution! I didn't have this case myself, so I appreciate a lot the use case you found.

I fixed the linting and add some tests. Should be ready to be merged

Signed-off-by: Xabier Larrakoetxea <me@slok.dev>
@slok slok merged commit fa89919 into slok:main Oct 15, 2021
@slok
Copy link
Owner

slok commented Oct 15, 2021

@Matir there is a new release with this fix. v0.6.1

Thanks again!

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.

OpenSSH ControlMaster sockets cause agebox errors
3 participants