| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
@danbev build started: https://ci.nodejs.org/blue/organizations/jenkins/node-test-pull-request-lite-pipeline/detail/node-test-pull-request-lite-pipeline/731/pipeline |
Sorry, something went wrong.
Sorry, something went wrong.
|
So, this is a valid fix, but I don't think it's the most correct one. Please take a look at cjihrig@00f21ee for an alternative fix. The issue is that os.userInfo() takes an optional object as its argument, and the JS layer adds a context object when calling the binding layer. I think it's better to always explicitly call the binding layer with two arguments. |
Sorry, something went wrong.
|
@cjihrig Ah, that is much better, thanks! |
Sorry, something went wrong.
os.userInfo() takes an optional object as its first argument. getCheckedFunction() adds a context object to the argument list passed to the binding layer. The context object has the potential to confuse the binding layer, particularly if an error occurs. This commit makes userInfo() explicitly call into the binding layer with two arguments.
os.userInfo() takes an optional object as its first argument. getCheckedFunction() adds a context object to the argument list passed to the binding layer. The context object has the potential to confuse the binding layer, particularly if an error occurs. This commit makes userInfo() explicitly call into the binding layer with two arguments. PR-URL: nodejs#22609 Refs: nodejs#22599 Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
os.userInfo() takes an optional object as its first argument. getCheckedFunction() adds a context object to the argument list passed to the binding layer. The context object has the potential to confuse the binding layer, particularly if an error occurs. This commit makes userInfo() explicitly call into the binding layer with two arguments. PR-URL: #22609 Refs: #22599 Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
os.userInfo() takes an optional object as its first argument. getCheckedFunction() adds a context object to the argument list passed to the binding layer. The context object has the potential to confuse the binding layer, particularly if an error occurs. This commit makes userInfo() explicitly call into the binding layer with two arguments. PR-URL: #22609 Refs: #22599 Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
| Back | FazBrowse Home | New Git URL |
os.userInfo() takes an optional object as its first argument.
getCheckedFunction() adds a context object to the argument list
passed to the binding layer. The context object has the potential
to confuse the binding layer, particularly if an error occurs.
This commit makes userInfo() explicitly call into the binding
layer with two arguments.
We ran into this issue when running node on OpenShift where the user ID
will be assigned by OpenShift regardless what is specified in the
DockerFile. This leads to the command os.userInfo() to fail with the
following error:
Using a command like whoami also fails:
sh-4.2$ id uid=1000030000 gid=0(root) groups=0(root),1000030000 sh-4.2$ whoami whoami: cannot find name for user ID 1000030000The issue here is that we are not getting the libuv error as the check
is prior to that. Debugging this we can see the errno:
This commit changes the args check to check that the length is one
instead of two.
Checklist