Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Only --unshare-user automatically if we're not root
#122 introduced a regression for the case of rpm-ostree running bubblewrap on CentOS 7. Previously the `is_privileged` variable captured whether or not our uid was 0, now it captures whether we're setuid. This bit of code enabled `--unshare-user` automatically if we're not privileged, but we suddenly started doing that for running as real uid 0 (CAP_SYS_ADMIN), which we don't want, since on CentOS/RHEL 7 today userns isn't even available to root without a module parameter and reboot. So, let's just do this only if not setuid *and* we're not uid 0 (really we should check "have CAP_SYS_ADMIN" but eh). Closes: #123 Approved by: alexlarsson
- Loading branch information