-
-
Notifications
You must be signed in to change notification settings - Fork 34.2k
net: allow IPC servers be accessible by all #19472
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
Conversation
doc/api/net.md
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: *** -> **
doc/api/net.md
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: *** -> **
doc/api/net.md
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These options should be camelCase.
lib/net.js
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since these are expected to be booleans, you could do options.readableAll === true.
|
Updated, PTAL. |
|
ping CI failures are unrelated. |
|
As per "Who to cc...", cc @bnoordhuis, @indutny, @nodejs/streams |
bnoordhuis
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pinging @santigimeno since he also reviewed the libuv pull request.
doc/api/net.md
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should explain why you would want to do that, not just how.
lib/net.js
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just curious, what is the reason you went for strict true-ness instead of truthiness?
lib/net.js
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check the return value.
santigimeno
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes LGTM. A couple of comments:
- I guess it's not easy testing this functionality on every platform but we could add tests that at least make sure that the changes don't break anything. We could even use
fs.statto check the mode of the pipe path on unices? - We should merge libuv/libuv#1635 soon to fix
uv_pipe_chmodonOS X.
|
@bzoz seems like the tests are failing. |
|
Linux failures seem unrelated, re-running the CI just to make sure: https://ci.nodejs.org/job/node-test-pull-request/14333/ |
|
Failures look unrelated, PTAL |
|
Ping? |
|
It would be good to get some further LGs for this. Ping @nodejs/http @nodejs/http2 @nodejs/streams |
src/pipe_wrap.cc
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you use the overload that takes a context argument, or (even better imo) write this as
CHECK(args[0]->IsInt32());
int mode = args[0].As<Int32>()->Value();?
src/pipe_wrap.h
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any reason not to expose the libuv names directly? Makes things a bit more grepable :)
|
Gentle ping in the direction of @bzoz :) |
Adds mappings to uv_pipe_chmod call by adding two new options to listen call. This allows the IPC server pipe to be made readable or writable by all users. Fixes: nodejs#19154
76f7e9e to
6d8b6dc
Compare
|
Updated (and rebased), PTAL |
|
Failures are unrelated, If no one objects I'll land this tomorrow. |
|
Landed in 531b4be |
Adds mappings to uv_pipe_chmod call by adding two new options to listen call. This allows the IPC server pipe to be made readable or writable by all users. Fixes: #19154 PR-URL: #19472 Reviewed-By: Santiago Gimeno <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
|
Marking semver-minor because of the two new options. |
Adds mappings to uv_pipe_chmod call by adding two new options to listen call. This allows the IPC server pipe to be made readable or writable by all users. Fixes: #19154 PR-URL: #19472 Reviewed-By: Santiago Gimeno <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
Notable Changes:
* **deps**:
- upgrade npm to 6.1.0 (Rebecca Turner)
#20190
* **fs**:
- fix reads with pos \> 4GB (Mathias Buus)
#21003
* **net**:
- new option to allow IPC servers to be readable and writable
by all users (Bartosz Sosnowski)
#19472
* **stream**:
- fix removeAllListeners() for Stream.Readable to work as expected
when no arguments are passed (Kael Zhang)
#20924
* **Added new collaborators**
- John-David Dalton (https://github.com/jdalton)
PR-URL: #21011
Notable Changes:
* **deps**:
- upgrade npm to 6.1.0 (Rebecca Turner)
#20190
* **fs**:
- fix reads with pos \> 4GB (Mathias Buus)
#21003
* **net**:
- new option to allow IPC servers to be readable and writable
by all users (Bartosz Sosnowski)
#19472
* **stream**:
- fix removeAllListeners() for Stream.Readable to work as expected
when no arguments are passed (Kael Zhang)
#20924
* **Added new collaborators**
- John-David Dalton (https://github.com/jdalton)
PR-URL: #21011
Notable Changes:
* **deps**:
- upgrade npm to 6.1.0 (Rebecca Turner)
#20190
* **fs**:
- fix reads with pos \> 4GB (Mathias Buus)
#21003
* **net**:
- new option to allow IPC servers to be readable and writable
by all users (Bartosz Sosnowski)
#19472
* **stream**:
- fix removeAllListeners() for Stream.Readable to work as expected
when no arguments are passed (Kael Zhang)
#20924
* **Added new collaborators**
- John-David Dalton (https://github.com/jdalton)
PR-URL: #21011
|
Just out of curiosity, is there any chance of this receiving a backport to Node 8 even though it already entered maintenance state? It seems like a very minor task as the proper libuv version is already present, and since there is no easy workaround for the lack of this functionality on node 8, especially on windows, I'd be happy to give it a shot. |
|
@jeroenvollenbrock I do not believe this will be able to land on 8.x. It is in maintenance mode and as such we don't do regular semver-minors. We did recently do one, but the only minor changes that landed were updates to napi /cc @nodejs/lts |
|
I understand and very well respect the policy of not backporting semver-minor changes. I do think however it might be a good idea to make it a bit more clear in the documentation that readableAll and writableAll are node 10+ options in case a backport is definitely not possible. The docs currently make it seem like these two options have been around since Node v0.11.14. I actually only found out they weren't after debugging EACCESS errors, and manually compared v8 docs with the v10 docs. |
Adds mappings to
uv_pipe_chmodcall by adding two new options to listen call. This allows the IPC server pipe to be made readable or writable by all users.Fixes: #19154
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes