]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
global: update HOME environment variable when dropping privileges
authorJason Dillaman <dillaman@redhat.com>
Wed, 21 Aug 2019 19:27:48 +0000 (15:27 -0400)
committerJason Dillaman <dillaman@redhat.com>
Thu, 22 Aug 2019 12:03:28 +0000 (08:03 -0400)
commit591fb2bf686be770fc07d7b02d54c4ccff81620f
treec208d5b360b59c65ca14dcd8532ab2152a7984b5
parentdad94db7ae9cb6f2d812a1be20517552ac95d047
global: update HOME environment variable when dropping privileges

k8s/rook is currently starting daemon pods under root using the
"--setuser" CLI optional to drop priviledges. In the case of
rbd-mirror which creates connections to remote clusters via librados,
the default search path for Ceph config files includes
"$home/.ceph/$cluster.conf", which before this change would evaluate
to "/root/.ceph/..." and then fail with a -EPERM since that directory
is not accessible by the dropped priviledges user.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
src/global/global_init.cc