]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
cephadm: check if cephadm is root after cli is parsed 44498/head
authorJohn Mulligan <jmulligan@redhat.com>
Thu, 6 Jan 2022 21:36:32 +0000 (16:36 -0500)
committerJohn Mulligan <jmulligan@redhat.com>
Fri, 7 Jan 2022 15:43:51 +0000 (10:43 -0500)
commit6f01977a68c3a2bba7bf2dfb7322728e7da96d0d
treefae750e85489c8e99342b49235ed67a5f89b2f93
parent110d294dc607ece48291d96bda08c5cce2c8ecd7
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>
src/cephadm/cephadm