]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
cephadm: check if cephadm is root after cli is parsed 44634/head
authorJohn Mulligan <jmulligan@redhat.com>
Thu, 6 Jan 2022 21:36:32 +0000 (16:36 -0500)
committerSebastian Wagner <sewagner@redhat.com>
Tue, 18 Jan 2022 11:06:56 +0000 (12:06 +0100)
commit0d2cad3e73a1e79b69a1929a9dc521087d8305c5
tree70e9e0bddc54e75a64cd23b79d6696a504e5ada2
parent55db6a9753aa6937ec7a78120680cfe5192f6478
cephadm: check if cephadm is root after cli is parsed

Fixes: https://tracker.ceph.com/issues/53572
Perform a check if cephadm is root after the CLI arguments are parsed
but before logging is configured. This allows a user to get help on
cephadm without requiring to be root or use sudo, etc.
The root check must be done before logging is configured because the
logging set up function creates dirs and files in system dirs.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
(cherry picked from commit 6f01977a68c3a2bba7bf2dfb7322728e7da96d0d)
src/cephadm/cephadm