1. 18 Jan, 2017 2 commits
    • start: fix execute and improve setgroups() calls · a5828a51
      Christian Brauner authored
      lxc_execute() and lxc-execute where broken when a user tried to switch to a
      non-root uid/gid. This prevented necessary setup operations like mounting the
      rootfs which require root in the user namespace. This commit separates
      switching to root in the user namespace from switching to the requested uid/gid
      by lxc_execute().
      This should be safe: Once we switched to root in the user namespace via
      setuid() and then switch to a non-root uid/gid in the user namespace for
      lxc_execute() via setuid() we cannot regain root privileges again. So we can
      only make us safer (Unless I forget about some very intricate user namespace
      nonsense; which is not as unlikely as I try to make it sound.).
      Signed-off-by: 's avatarChristian Brauner <christian.brauner@ubuntu.com>
    • utils: add uid, gid, group convenience wrappers · 274f480f
      Christian Brauner authored
      This commit adds lxc_switch_uid_gid() which allows to switch the uid and gid of
      a process via setuid() and setgid() and lxc_setgroups() which allows to set
      groups via setgroups(). The main advantage is that they nicely log the switches
      they perform.
      Signed-off-by: 's avatarChristian Brauner <christian.brauner@ubuntu.com>
  2. 05 Jan, 2017 4 commits
  3. 03 Jan, 2017 4 commits
  4. 15 Dec, 2016 8 commits
  5. 09 Dec, 2016 1 commit
  6. 08 Dec, 2016 1 commit
  7. 07 Dec, 2016 3 commits
  8. 01 Dec, 2016 17 commits