fix(rpc): handle EINVAL from chmod on Unix sockets in containers#1399
Merged
steveyegge merged 1 commit intosteveyegge:mainfrom Jan 31, 2026
Merged
fix(rpc): handle EINVAL from chmod on Unix sockets in containers#1399steveyegge merged 1 commit intosteveyegge:mainfrom
steveyegge merged 1 commit intosteveyegge:mainfrom
Conversation
Some filesystems (e.g., virtio-fs used by Apple's Virtualization.framework for containers) don't support chmod on Unix domain sockets, returning EINVAL. This change makes the chmod error non-fatal for EINVAL/ENOTSUP, since the socket is already protected by: - Parent directory permissions (0700) - Process umask The security intent from bd-158 (commit 0dac4b9) is preserved - we still attempt chmod and fail on other errors (e.g., EPERM). Fixes steveyegge#1084 cc @steveyegge (original author of the socket permission check in bd-158) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
steveyegge
approved these changes
Jan 31, 2026
Owner
steveyegge
left a comment
There was a problem hiding this comment.
Easy-win: makes chmod non-fatal for EINVAL/ENOTSUP on Unix sockets in containers. Security intent from bd-158 preserved (still fails on EPERM etc). Good strace evidence. LGTM.
groblegark
pushed a commit
to groblegark/beads
that referenced
this pull request
Jan 31, 2026
…veyegge#1399) Some filesystems (e.g., virtio-fs used by Apple's Virtualization.framework for containers) don't support chmod on Unix domain sockets, returning EINVAL. This change makes the chmod error non-fatal for EINVAL/ENOTSUP, since the socket is already protected by: - Parent directory permissions (0700) - Process umask The security intent from bd-158 (commit 0dac4b9) is preserved - we still attempt chmod and fail on other errors (e.g., EPERM). Fixes steveyegge#1084 cc @steveyegge (original author of the socket permission check in bd-158) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: r. Miki Habryn <[email protected]> Co-authored-by: Claude Opus 4.5 <[email protected]> (cherry picked from commit 306de3b)
groblegark
pushed a commit
to groblegark/beads
that referenced
this pull request
Jan 31, 2026
…veyegge#1399) Some filesystems (e.g., virtio-fs used by Apple's Virtualization.framework for containers) don't support chmod on Unix domain sockets, returning EINVAL. This change makes the chmod error non-fatal for EINVAL/ENOTSUP, since the socket is already protected by: - Parent directory permissions (0700) - Process umask The security intent from bd-158 (commit 0dac4b9) is preserved - we still attempt chmod and fail on other errors (e.g., EPERM). Fixes steveyegge#1084 cc @steveyegge (original author of the socket permission check in bd-158) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: r. Miki Habryn <[email protected]> Co-authored-by: Claude Opus 4.5 <[email protected]> (cherry picked from commit 306de3b)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Some filesystems (e.g., virtio-fs used by Apple's Virtualization.framework for containers) don't support chmod on Unix domain sockets, returning EINVAL.
This change makes the chmod error non-fatal for EINVAL/ENOTSUP, since the socket is already protected by:
The security intent from bd-158 (commit 0dac4b9) is preserved - we still attempt chmod and fail on other errors (e.g., EPERM).
Fixes #1084
cc @steveyegge (original author of the socket permission check in bd-158)
🤖 Generated with Claude Code
Strace shows: