]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
global: update HOME environment variable when dropping privileges 30118/head
authorJason Dillaman <dillaman@redhat.com>
Wed, 21 Aug 2019 19:27:48 +0000 (15:27 -0400)
committerNathan Cutler <ncutler@suse.com>
Wed, 4 Sep 2019 13:12:51 +0000 (15:12 +0200)
commitc12336f5f8d3668ad7d1852e8211542eee87f42c
treec0d6476b9806b71009d61fab05cd70f0aa9db05b
parentdeaa02e85715f8224c1899c39690544e3b07e5bc
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>
(cherry picked from commit 591fb2bf686be770fc07d7b02d54c4ccff81620f)

Conflicts:
src/global/global_init.cc
- master has g_conf()-> where luminous does g_conf->
src/global/global_init.cc