Lines Matching refs:xi

22 	struct ceph_x_info *xi = ac->private;  in ceph_x_is_authenticated()  local
27 ac->want_keys, need, xi->have_keys); in ceph_x_is_authenticated()
28 return (ac->want_keys & xi->have_keys) == ac->want_keys; in ceph_x_is_authenticated()
33 struct ceph_x_info *xi = ac->private; in ceph_x_should_authenticate() local
38 ac->want_keys, need, xi->have_keys); in ceph_x_should_authenticate()
101 struct ceph_x_info *xi = ac->private; in get_ticket_handler() local
102 struct rb_node *parent = NULL, **p = &xi->ticket_handlers.rb_node; in get_ticket_handler()
121 rb_insert_color(&th->node, &xi->ticket_handlers); in get_ticket_handler()
128 struct ceph_x_info *xi = ac->private; in remove_ticket_handler() local
131 rb_erase(&th->node, &xi->ticket_handlers); in remove_ticket_handler()
142 struct ceph_x_info *xi = ac->private; in process_one_ticket() local
243 xi->have_keys |= th->service; in process_one_ticket()
390 struct ceph_x_info *xi = ac->private; in ceph_x_validate_tickets() local
393 *pneed = ac->want_keys & ~(xi->have_keys); in ceph_x_validate_tickets()
414 xi->have_keys &= ~service; in ceph_x_validate_tickets()
422 struct ceph_x_info *xi = ac->private; in ceph_x_build_request() local
435 ac->want_keys, xi->have_keys, need); in ceph_x_build_request()
453 tmp.server_challenge = cpu_to_le64(xi->server_challenge); in ceph_x_build_request()
454 ret = ceph_x_encrypt(&xi->secret, &tmp, sizeof(tmp), in ceph_x_build_request()
464 xi->server_challenge, le64_to_cpu(auth->client_challenge), in ceph_x_build_request()
483 ret = ceph_x_build_authorizer(ac, th, &xi->auth_authorizer); in ceph_x_build_request()
486 ceph_encode_copy(&p, xi->auth_authorizer.buf->vec.iov_base, in ceph_x_build_request()
487 xi->auth_authorizer.buf->vec.iov_len); in ceph_x_build_request()
501 struct ceph_x_info *xi = ac->private; in ceph_x_handle_reply() local
511 if (xi->starting) { in ceph_x_handle_reply()
517 xi->server_challenge = le64_to_cpu(sc->server_challenge); in ceph_x_handle_reply()
519 xi->server_challenge); in ceph_x_handle_reply()
520 xi->starting = false; in ceph_x_handle_reply()
521 xi->have_keys &= ~CEPH_ENTITY_TYPE_AUTH; in ceph_x_handle_reply()
531 ret = ceph_x_proc_ticket_reply(ac, &xi->secret, in ceph_x_handle_reply()
548 if (ac->want_keys == xi->have_keys) in ceph_x_handle_reply()
643 struct ceph_x_info *xi = ac->private; in ceph_x_reset() local
646 xi->starting = true; in ceph_x_reset()
647 xi->server_challenge = 0; in ceph_x_reset()
652 struct ceph_x_info *xi = ac->private; in ceph_x_destroy() local
656 ceph_crypto_key_destroy(&xi->secret); in ceph_x_destroy()
658 while ((p = rb_first(&xi->ticket_handlers)) != NULL) { in ceph_x_destroy()
664 ceph_x_authorizer_cleanup(&xi->auth_authorizer); in ceph_x_destroy()
757 struct ceph_x_info *xi; in ceph_x_init() local
762 xi = kzalloc(sizeof(*xi), GFP_NOFS); in ceph_x_init()
763 if (!xi) in ceph_x_init()
772 ret = ceph_crypto_key_clone(&xi->secret, ac->key); in ceph_x_init()
778 xi->starting = true; in ceph_x_init()
779 xi->ticket_handlers = RB_ROOT; in ceph_x_init()
782 ac->private = xi; in ceph_x_init()
787 kfree(xi); in ceph_x_init()