Skip to content

[#1791] Reject Unix socket paths that don't fit in sun_path - #1792

Open
Pranav-error wants to merge 1 commit into
pgmoneta:mainfrom
Pranav-error:unix-socket-path-length
Open

Pranav-error wants to merge 1 commit into
pgmoneta:mainfrom
Pranav-error:unix-socket-path-length

Conversation

@Pranav-error

Copy link
Copy Markdown
Collaborator

Fixes #1791.

Refuse a Unix socket path that doesn't fit in sun_path instead of binding and chmod'ing cut-off paths.

Adds test_network_bind_unix_socket_path_too_long (new test_network.c): on main the bind succeeds or leaves a stray socket and the directory mode changes; with this change it fails cleanly and the directory is untouched. Checked on macOS (Debug, ASan). Same fix as pgexporter#727.

Copilot AI balanced review requested due to automatic review settings December 1, 2026 21:03

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

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.

A long unix_socket_dir makes pgmoneta chmod the wrong path

2 participants