mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-05-02 18:17:50 -04:00
ceph: Move secret key parsing earlier.
This makes the base64 logic be contained in mount option parsing, and prepares us for replacing the homebew key management with the kernel key retention service. Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com> Signed-off-by: Sage Weil <sage@newdream.net>
This commit is contained in:
committed by
Sage Weil
parent
fbdb919048
commit
8323c3aa74
@@ -662,14 +662,16 @@ int ceph_x_init(struct ceph_auth_client *ac)
|
||||
goto out;
|
||||
|
||||
ret = -EINVAL;
|
||||
if (!ac->secret) {
|
||||
if (!ac->key) {
|
||||
pr_err("no secret set (for auth_x protocol)\n");
|
||||
goto out_nomem;
|
||||
}
|
||||
|
||||
ret = ceph_crypto_key_unarmor(&xi->secret, ac->secret);
|
||||
if (ret)
|
||||
ret = ceph_crypto_key_clone(&xi->secret, ac->key);
|
||||
if (ret < 0) {
|
||||
pr_err("cannot clone key: %d\n", ret);
|
||||
goto out_nomem;
|
||||
}
|
||||
|
||||
xi->starting = true;
|
||||
xi->ticket_handlers = RB_ROOT;
|
||||
|
||||
Reference in New Issue
Block a user