Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
lxc-start-ephemeral: Parse passwd directly #667
Conversation
added a commit
that referenced
this pull request
Sep 30, 2015
stgraber
merged commit e209cdd
into
lxc:master
Sep 30, 2015
1 check passed
continuous-integration/travis-ci/pr
The Travis CI build passed
Details
pushed a commit
to z-image/lxc
that referenced
this pull request
Oct 16, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
cjwatson commentedSep 30, 2015
On Ubuntu 15.04, lxc-start-ephemeral's call to pwd.getpwnam always
fails. While I haven't been able to prove it or track down an exact
cause, I strongly suspect that glibc does not guarantee that you can
call NSS functions after a context switch without re-execing. (Running
"id root" in a subprocess from the same point works fine.)
It's safer to use getent to extract the relevant line from the passwd
file and parse it directly.
Signed-off-by: Colin Watson cjwatson@ubuntu.com