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

linux: support abstract unix sockets #4030

Merged
merged 5 commits into from
Jun 4, 2023
Merged

Conversation

bnoordhuis
Copy link
Member

@bnoordhuis bnoordhuis commented May 25, 2023

Add two new APIs for binding and connecting to abstract UNIX sockets.

Fixes: #4028

Add two new APIs for binding and connecting to abstract UNIX sockets.

Fixes: libuv#4028
@bnoordhuis bnoordhuis force-pushed the fix4028 branch 2 times, most recently from a157008 to f70a685 Compare May 29, 2023 20:03
test/test-pipe-getsockname.c Show resolved Hide resolved
src/unix/pipe.c Show resolved Hide resolved
Copy link
Member

@trevnorris trevnorris left a comment

Choose a reason for hiding this comment

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

Code looks good. Should documentation be added later?

test/test-pipe-getsockname.c Outdated Show resolved Hide resolved
@bnoordhuis
Copy link
Member Author

Documentation added and I backed out the long patch check per #4036 (comment) - i.e., it simply truncates long paths again.

After this is merged I'll open a PR to introduce a flag to error on long paths.

@bnoordhuis bnoordhuis merged commit b9b6db0 into libuv:v1.x Jun 4, 2023
@bnoordhuis bnoordhuis deleted the fix4028 branch June 4, 2023 20:43
ggoodman added a commit to ggoodman/node that referenced this pull request Sep 15, 2023
The introduction of the uv_pipe_bind2 and uv_pipe_connect2 methods in
libuv v1.46.0 changed the behaviour of uv_pipe_bind and uv_pipe_connect.
This broke the ability to connect to abstract domain sockets on linux.
This change ports PipeWrap to use the new uv_pipe_bind2 and
uv_pipe_connect2 methods to restore abstract domain socket support.

Fixes: nodejs#49656
Refs: libuv/libuv#4030
ggoodman added a commit to ggoodman/node that referenced this pull request Sep 15, 2023
The introduction of the uv_pipe_bind2 and uv_pipe_connect2 methods in
libuv v1.46.0 changed the behaviour of uv_pipe_bind and uv_pipe_connect.
This broke the ability to connect to abstract domain sockets on linux.
This change ports PipeWrap to use the new uv_pipe_bind2 and
uv_pipe_connect2 methods to restore abstract domain socket support.

Fixes: nodejs#49656
Refs: libuv/libuv#4030
ggoodman added a commit to ggoodman/node that referenced this pull request Sep 15, 2023
The introduction of the uv_pipe_bind2 and uv_pipe_connect2 methods in
libuv v1.46.0 changed the behaviour of uv_pipe_bind and uv_pipe_connect.
This broke the ability to connect to abstract domain sockets on linux.
This change ports PipeWrap to use the new uv_pipe_bind2 and
uv_pipe_connect2 methods to restore abstract domain socket support.

Fixes: nodejs#49656
Refs: libuv/libuv#4030
nodejs-github-bot pushed a commit to nodejs/node that referenced this pull request Sep 18, 2023
The introduction of the uv_pipe_bind2 and uv_pipe_connect2 methods in
libuv v1.46.0 changed the behaviour of uv_pipe_bind and uv_pipe_connect.
This broke the ability to connect to abstract domain sockets on linux.
This change ports PipeWrap to use the new uv_pipe_bind2 and
uv_pipe_connect2 methods to restore abstract domain socket support.

Fixes: #49656
Refs: libuv/libuv#4030
PR-URL: #49667
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
ruyadorno pushed a commit to nodejs/node that referenced this pull request Sep 28, 2023
The introduction of the uv_pipe_bind2 and uv_pipe_connect2 methods in
libuv v1.46.0 changed the behaviour of uv_pipe_bind and uv_pipe_connect.
This broke the ability to connect to abstract domain sockets on linux.
This change ports PipeWrap to use the new uv_pipe_bind2 and
uv_pipe_connect2 methods to restore abstract domain socket support.

Fixes: #49656
Refs: libuv/libuv#4030
PR-URL: #49667
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
alexfernandez pushed a commit to alexfernandez/node that referenced this pull request Nov 1, 2023
The introduction of the uv_pipe_bind2 and uv_pipe_connect2 methods in
libuv v1.46.0 changed the behaviour of uv_pipe_bind and uv_pipe_connect.
This broke the ability to connect to abstract domain sockets on linux.
This change ports PipeWrap to use the new uv_pipe_bind2 and
uv_pipe_connect2 methods to restore abstract domain socket support.

Fixes: nodejs#49656
Refs: libuv/libuv#4030
PR-URL: nodejs#49667
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
vtjnash added a commit to vtjnash/libuv that referenced this pull request Nov 6, 2023
vtjnash added a commit to vtjnash/libuv that referenced this pull request Nov 6, 2023
This was incorrectly dropped by libuv#4030, where previously connecting to ""
might fail eventually, now instead it would return EINVAL and then fail
to initialize the struct or call the callback.
vtjnash added a commit to vtjnash/libuv that referenced this pull request Nov 7, 2023
This was incorrectly dropped by libuv#4030, where previously connecting to ""
might fail eventually, now instead it would return EINVAL and then fail
to initialize the struct or call the callback.
vtjnash added a commit to vtjnash/libuv that referenced this pull request Nov 7, 2023
deokjinkim added a commit to deokjinkim/node that referenced this pull request Nov 10, 2023
We need to handle errors from uv_pipe_connect2()
because return type is `int`.

Fixes: nodejs#50652
Refs: nodejs#49667
Refs: libuv/libuv#4030
deokjinkim added a commit to deokjinkim/node that referenced this pull request Nov 10, 2023
We need to handle errors from uv_pipe_connect2()
because return type is `int`.

Fixes: nodejs#50652
Refs: nodejs#49667
Refs: libuv/libuv#4030
nodejs-github-bot pushed a commit to nodejs/node that referenced this pull request Nov 12, 2023
We need to handle errors from uv_pipe_connect2()
because return type is `int`.

Fixes: #50652
Refs: #49667
Refs: libuv/libuv#4030
PR-URL: #50657
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: theanarkh <theratliter@gmail.com>
vtjnash added a commit that referenced this pull request Nov 14, 2023
This was incorrectly dropped by #4030, where previously connecting to ""
might fail eventually, now instead it would return EINVAL and then fail
to initialize the struct or call the callback.
vtjnash added a commit to vtjnash/libuv that referenced this pull request Nov 14, 2023
This was incorrectly dropped by libuv#4030, where previously connecting to ""
might fail eventually, now instead it would return EINVAL and then fail
to initialize the struct or call the callback.
targos pushed a commit to nodejs/node that referenced this pull request Nov 23, 2023
We need to handle errors from uv_pipe_connect2()
because return type is `int`.

Fixes: #50652
Refs: #49667
Refs: libuv/libuv#4030
PR-URL: #50657
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: theanarkh <theratliter@gmail.com>
UlisesGascon pushed a commit to nodejs/node that referenced this pull request Dec 11, 2023
We need to handle errors from uv_pipe_connect2()
because return type is `int`.

Fixes: #50652
Refs: #49667
Refs: libuv/libuv#4030
PR-URL: #50657
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: theanarkh <theratliter@gmail.com>
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.

linux: abstract unix socket support
3 participants