diff options
author | Tommi Virtanen <tommi.virtanen@dreamhost.com> | 2011-03-25 19:32:57 -0400 |
---|---|---|
committer | Sage Weil <sage@newdream.net> | 2011-03-29 15:11:16 -0400 |
commit | 8323c3aa74cd92465350294567142d12ffdcc963 (patch) | |
tree | 052e7374393994eea8d534f98ee1bc7acea4c2d9 /net/ceph/auth_x.c | |
parent | fbdb9190482fd83a3eb20cdeb0da454759f479d7 (diff) |
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>
Diffstat (limited to 'net/ceph/auth_x.c')
-rw-r--r-- | net/ceph/auth_x.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/net/ceph/auth_x.c b/net/ceph/auth_x.c index 7fd5dfcf6e18..1587dc6010c6 100644 --- a/net/ceph/auth_x.c +++ b/net/ceph/auth_x.c | |||
@@ -662,14 +662,16 @@ int ceph_x_init(struct ceph_auth_client *ac) | |||
662 | goto out; | 662 | goto out; |
663 | 663 | ||
664 | ret = -EINVAL; | 664 | ret = -EINVAL; |
665 | if (!ac->secret) { | 665 | if (!ac->key) { |
666 | pr_err("no secret set (for auth_x protocol)\n"); | 666 | pr_err("no secret set (for auth_x protocol)\n"); |
667 | goto out_nomem; | 667 | goto out_nomem; |
668 | } | 668 | } |
669 | 669 | ||
670 | ret = ceph_crypto_key_unarmor(&xi->secret, ac->secret); | 670 | ret = ceph_crypto_key_clone(&xi->secret, ac->key); |
671 | if (ret) | 671 | if (ret < 0) { |
672 | pr_err("cannot clone key: %d\n", ret); | ||
672 | goto out_nomem; | 673 | goto out_nomem; |
674 | } | ||
673 | 675 | ||
674 | xi->starting = true; | 676 | xi->starting = true; |
675 | xi->ticket_handlers = RB_ROOT; | 677 | xi->ticket_handlers = RB_ROOT; |