diff options
Diffstat (limited to 'fs/ceph/auth_x.c')
-rw-r--r-- | fs/ceph/auth_x.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/fs/ceph/auth_x.c b/fs/ceph/auth_x.c index 7b206231566d..83d4d2785ffe 100644 --- a/fs/ceph/auth_x.c +++ b/fs/ceph/auth_x.c | |||
@@ -27,6 +27,17 @@ static int ceph_x_is_authenticated(struct ceph_auth_client *ac) | |||
27 | return (ac->want_keys & xi->have_keys) == ac->want_keys; | 27 | return (ac->want_keys & xi->have_keys) == ac->want_keys; |
28 | } | 28 | } |
29 | 29 | ||
30 | static int ceph_x_should_authenticate(struct ceph_auth_client *ac) | ||
31 | { | ||
32 | struct ceph_x_info *xi = ac->private; | ||
33 | int need; | ||
34 | |||
35 | ceph_x_validate_tickets(ac, &need); | ||
36 | dout("ceph_x_should_authenticate want=%d need=%d have=%d\n", | ||
37 | ac->want_keys, need, xi->have_keys); | ||
38 | return need != 0; | ||
39 | } | ||
40 | |||
30 | static int ceph_x_encrypt_buflen(int ilen) | 41 | static int ceph_x_encrypt_buflen(int ilen) |
31 | { | 42 | { |
32 | return sizeof(struct ceph_x_encrypt_header) + ilen + 16 + | 43 | return sizeof(struct ceph_x_encrypt_header) + ilen + 16 + |
@@ -620,6 +631,7 @@ static void ceph_x_invalidate_authorizer(struct ceph_auth_client *ac, | |||
620 | static const struct ceph_auth_client_ops ceph_x_ops = { | 631 | static const struct ceph_auth_client_ops ceph_x_ops = { |
621 | .name = "x", | 632 | .name = "x", |
622 | .is_authenticated = ceph_x_is_authenticated, | 633 | .is_authenticated = ceph_x_is_authenticated, |
634 | .should_authenticate = ceph_x_should_authenticate, | ||
623 | .build_request = ceph_x_build_request, | 635 | .build_request = ceph_x_build_request, |
624 | .handle_reply = ceph_x_handle_reply, | 636 | .handle_reply = ceph_x_handle_reply, |
625 | .create_authorizer = ceph_x_create_authorizer, | 637 | .create_authorizer = ceph_x_create_authorizer, |