Lines Matching refs:xi
21 struct ceph_x_info *xi = ac->private; in ceph_x_is_authenticated() local
26 ac->want_keys, need, xi->have_keys); in ceph_x_is_authenticated()
27 return (ac->want_keys & xi->have_keys) == ac->want_keys; in ceph_x_is_authenticated()
32 struct ceph_x_info *xi = ac->private; in ceph_x_should_authenticate() local
37 ac->want_keys, need, xi->have_keys); in ceph_x_should_authenticate()
100 struct ceph_x_info *xi = ac->private; in get_ticket_handler() local
101 struct rb_node *parent = NULL, **p = &xi->ticket_handlers.rb_node; in get_ticket_handler()
120 rb_insert_color(&th->node, &xi->ticket_handlers); in get_ticket_handler()
127 struct ceph_x_info *xi = ac->private; in remove_ticket_handler() local
130 rb_erase(&th->node, &xi->ticket_handlers); in remove_ticket_handler()
141 struct ceph_x_info *xi = ac->private; in process_one_ticket() local
242 xi->have_keys |= th->service; in process_one_ticket()
381 struct ceph_x_info *xi = ac->private; in ceph_x_validate_tickets() local
384 *pneed = ac->want_keys & ~(xi->have_keys); in ceph_x_validate_tickets()
405 xi->have_keys &= ~service; in ceph_x_validate_tickets()
413 struct ceph_x_info *xi = ac->private; in ceph_x_build_request() local
426 ac->want_keys, xi->have_keys, need); in ceph_x_build_request()
444 tmp.server_challenge = cpu_to_le64(xi->server_challenge); in ceph_x_build_request()
445 ret = ceph_x_encrypt(&xi->secret, &tmp, sizeof(tmp), in ceph_x_build_request()
455 xi->server_challenge, le64_to_cpu(auth->client_challenge), in ceph_x_build_request()
474 ret = ceph_x_build_authorizer(ac, th, &xi->auth_authorizer); in ceph_x_build_request()
477 ceph_encode_copy(&p, xi->auth_authorizer.buf->vec.iov_base, in ceph_x_build_request()
478 xi->auth_authorizer.buf->vec.iov_len); in ceph_x_build_request()
492 struct ceph_x_info *xi = ac->private; in ceph_x_handle_reply() local
502 if (xi->starting) { in ceph_x_handle_reply()
508 xi->server_challenge = le64_to_cpu(sc->server_challenge); in ceph_x_handle_reply()
510 xi->server_challenge); in ceph_x_handle_reply()
511 xi->starting = false; in ceph_x_handle_reply()
512 xi->have_keys &= ~CEPH_ENTITY_TYPE_AUTH; in ceph_x_handle_reply()
522 ret = ceph_x_proc_ticket_reply(ac, &xi->secret, in ceph_x_handle_reply()
539 if (ac->want_keys == xi->have_keys) in ceph_x_handle_reply()
635 struct ceph_x_info *xi = ac->private; in ceph_x_reset() local
638 xi->starting = true; in ceph_x_reset()
639 xi->server_challenge = 0; in ceph_x_reset()
644 struct ceph_x_info *xi = ac->private; in ceph_x_destroy() local
648 ceph_crypto_key_destroy(&xi->secret); in ceph_x_destroy()
650 while ((p = rb_first(&xi->ticket_handlers)) != NULL) { in ceph_x_destroy()
656 if (xi->auth_authorizer.buf) in ceph_x_destroy()
657 ceph_buffer_put(xi->auth_authorizer.buf); in ceph_x_destroy()
747 struct ceph_x_info *xi; in ceph_x_init() local
752 xi = kzalloc(sizeof(*xi), GFP_NOFS); in ceph_x_init()
753 if (!xi) in ceph_x_init()
762 ret = ceph_crypto_key_clone(&xi->secret, ac->key); in ceph_x_init()
768 xi->starting = true; in ceph_x_init()
769 xi->ticket_handlers = RB_ROOT; in ceph_x_init()
772 ac->private = xi; in ceph_x_init()
777 kfree(xi); in ceph_x_init()