Otherwise our keyring default location, or any other similarly formatted
location, will be taken as the actual location for the keyring and fail.
Reported-by: tziOm (at) #ceph
Fixes: 3276
Backport: argonaut
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
}
KeyRing keyring;
- r = keyring.load(g_ceph_context, g_conf->keyring);
+ string keyring_filename;
+ if (!ceph_resolve_file_search(g_conf->keyring, keyring_filename)) {
+ derr << "unable to find a keyring file on " << g_conf->keyring << dendl;
+ return -ENOENT;
+ }
+
+ r = keyring.load(g_ceph_context, keyring_filename);
if (r < 0) {
derr << "unable to load initial keyring " << g_conf->keyring << dendl;
return r;