[lxc-devel] [lxc/lxc] c6be89: lxc-start-ephemeral: Parse passwd directly

GitHub noreply at github.com
Wed Sep 30 17:56:53 UTC 2015


  Branch: refs/heads/master
  Home:   https://github.com/lxc/lxc
  Commit: c6be89f8570be19c33af49198d4eb8e6d27d626f
      https://github.com/lxc/lxc/commit/c6be89f8570be19c33af49198d4eb8e6d27d626f
  Author: Colin Watson <cjwatson at ubuntu.com>
  Date:   2015-09-30 (Wed, 30 Sep 2015)

  Changed paths:
    M src/lxc/lxc-start-ephemeral.in

  Log Message:
  -----------
  lxc-start-ephemeral: Parse passwd directly

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 at ubuntu.com>


  Commit: e209cddb668647038ca83568250567dcc8433fad
      https://github.com/lxc/lxc/commit/e209cddb668647038ca83568250567dcc8433fad
  Author: Stéphane Graber <stgraber at stgraber.org>
  Date:   2015-09-30 (Wed, 30 Sep 2015)

  Changed paths:
    M src/lxc/lxc-start-ephemeral.in

  Log Message:
  -----------
  Merge pull request #667 from cjwatson/ephemeral-parse-passwd

lxc-start-ephemeral: Parse passwd directly


Compare: https://github.com/lxc/lxc/compare/4928c7186c4d...e209cddb6686


More information about the lxc-devel mailing list