Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upapi.go doesn't respect nsswitch.conf #1715
Comments
eliasp
referenced this issue
Aug 28, 2013
Merged
API, issue 1471: Use groups for socket permissions #1485
This comment has been minimized.
This comment has been minimized.
|
@eliasp It sounds like you know exactly what to do, a pull request would be great. ;) |
This comment has been minimized.
This comment has been minimized.
|
@crosbymichael Well, I know (more or less) exactly what to do, I just completely lack any Go skills. |
This comment has been minimized.
This comment has been minimized.
|
@eliasp Try it out and if you need any help just let me know. |
This comment has been minimized.
This comment has been minimized.
|
Currently, the tests for
I feel uncomfortable to start doing changes here and fixing these tests is a little too much for me as a start in Docker/Go… maybe someone could have a look at these failing tests first. |
This comment has been minimized.
This comment has been minimized.
|
I'm not sure, but — since we're using static linking (and therefore, not On Wed, Aug 28, 2013 at 5:10 PM, Elias Probst notifications@github.comwrote:
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
@creack Sorry, turned out it was my fault… I fetched @jpetazzo It seems to be possible. But I'm wondering why docker is built statically linked at all? Are there any (possibly Go specific) reasons for that? |
This comment has been minimized.
This comment has been minimized.
|
The stackoverflow question is a very useful pointer, thanks! Regarding "why do we build docker statically?", that's because docker is But if we can find a way to link with extra libs and still get a static On Thu, Aug 29, 2013 at 4:52 PM, Elias Probst notifications@github.comwrote:
|
This comment has been minimized.
This comment has been minimized.
|
@jpetazzo Thanks for the explanation, that's actually one of the few situations, where static-linking is preferred. FYI: I won't have time until next Tuesday to work on the implementation of this issue. |
This comment has been minimized.
This comment has been minimized.
|
Any takers? I'll mark this as an easy fix for aspiring contributors. |
This comment has been minimized.
This comment has been minimized.
|
I found this: https://github.com/proxypoke/group.go but no license sadly. |
This comment has been minimized.
This comment has been minimized.
|
See: So potentially a future version of Go will have group lookup functions to go with the user lookup stubs. My guess is that they'll look to start reviewing stuff like this after they finally get the feature-frozen Go 1.2 out the door, then we'll just have to wait until n+1 gets released. Until then, we could implement the same code applied there if it's important enough. |
This comment has been minimized.
This comment has been minimized.
|
It looks like nobody is actively working on this. For the record this is open to contributors. |
This comment has been minimized.
This comment has been minimized.
|
ping @tianon I think your groups stuff fixes this? |
This comment has been minimized.
This comment has been minimized.
dwlocks
commented
Mar 18, 2014
|
I've run into this bug in .9: NIS group membership is not respected, but /etc/group membership is. So if @tianon 's groups stuff is in .9, it does not fix this issue. |
This comment has been minimized.
This comment has been minimized.
|
I can confirm that my groups stuff definitely does not fix anything related to NSS, which has been an issue in the past specifically because we link statically, and linking the nss libraries statically is a problem. This might be something we could look to enable now, but I'm not positive. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
We're static linking several libraries already, but aren't the NSS libraries specific to the version of NSS that's currently on the system? I'll admit that my knowledge of NSS doesn't go much further than hacking through the configuration files to get them to do what I needed. See also #4450 (comment) for a discussion of why we can't just use Go's own |
This comment has been minimized.
This comment has been minimized.
|
The problem is that NSS is plugin based, so it will dlopen() some module that in turn links to the dynamic glibc. |
This comment has been minimized.
This comment has been minimized.
|
Note, i think typically that would work, because the module only sees the dynamic glibc and the app the static one. However, if the two libcs are of a very different version, then its possible that some of the internal ABIs have changed (maybe the NSS plugin structs where modified) which can cause problems. This is why it says:
I.e. you need at runtime the same version of glibc as during the (static) linktime. |
This comment has been minimized.
This comment has been minimized.
|
This sounds like another use case that could leverage a separate binary, for a command like |
This comment has been minimized.
This comment has been minimized.
aus
commented
Nov 14, 2014
|
This can probably be closed now that libcontainer handles group look ups. |
jim-minter
referenced this issue
Dec 15, 2014
Closed
Host System self-referencing requires FQDN to resolve (correctly) #268
jessfraz
added
the
exp/expert
label
Feb 25, 2015
aidanhs
referenced this issue
Mar 13, 2015
Merged
Allow a non-existent groupid to own the docker socket #11377
This comment has been minimized.
This comment has been minimized.
|
seems like there's a new patch set but still in review since ~11 months https://codereview.appspot.com/101310044 and also #11377 is merged now as a workaround |
gentoo-repo-qa-bot
pushed a commit
to gentoo-mirror/docker
that referenced
this issue
Aug 13, 2015
jessfraz
removed
the
status/help-wanted
label
Sep 8, 2015
This comment has been minimized.
This comment has been minimized.
prune998
commented
Sep 30, 2015
|
Any news on this ? Thanks. |
This comment has been minimized.
This comment has been minimized.
GordonTheTurtle
commented
Jul 20, 2016
|
USER POLL The best way to get notified of updates is to use the Subscribe button on this page. Please don't use "+1" or "I have this too" comments on issues. We automatically The people listed below have upvoted this issue by leaving a +1 comment: |
This comment has been minimized.
This comment has been minimized.
|
Given the activity level on this issue, I'm going to close it as it's either fixed, a duplicate or not a request anymore. If you think I'm mistaken, feel free to discuss it there |
vdemeester
closed this
Feb 14, 2018
This comment has been minimized.
This comment has been minimized.
nicoulaj
commented
Nov 1, 2018
|
Not sure why this would be closed, this bug is still there. See docker/for-linux#186 and analysis by @mjameswh. |
mjameswh
referenced this issue
Nov 1, 2018
Merged
Use idtools.LookupGroup instead of parsing /etc/group file for docker.sock ownership #38126
This comment has been minimized.
This comment has been minimized.
prune998
commented
Nov 2, 2018
|
Please fix before closing ! |
This comment has been minimized.
This comment has been minimized.
|
@vdemeester Could you please consider reopening this issue? I think the PR I submitted yesterday should fix it, but I'm afraid that at present, it won't get any attention because it has been closed a long time ago... |
eliasp commentedAug 28, 2013
Due to the implementation of api.go which reads only
/etc/group, it is impossible to rely on other auth mechanisms (e.g. LDAP, NIS).Instead, the
getgrnamsyscall should be used to determine, whether adockergroup exists or not.The implemenation of
lookup_unix.goin theuserGo package might serve as inspiration on how to do this.