Lines Matching refs:au

275 				   struct ceph_x_authorizer *au)  in ceph_x_build_authorizer()  argument
286 ceph_entity_type_name(th->service), au); in ceph_x_build_authorizer()
291 if (au->buf && au->buf->alloc_len < maxlen) { in ceph_x_build_authorizer()
292 ceph_buffer_put(au->buf); in ceph_x_build_authorizer()
293 au->buf = NULL; in ceph_x_build_authorizer()
295 if (!au->buf) { in ceph_x_build_authorizer()
296 au->buf = ceph_buffer_new(maxlen, GFP_NOFS); in ceph_x_build_authorizer()
297 if (!au->buf) in ceph_x_build_authorizer()
300 au->service = th->service; in ceph_x_build_authorizer()
301 au->secret_id = th->secret_id; in ceph_x_build_authorizer()
303 msg_a = au->buf->vec.iov_base; in ceph_x_build_authorizer()
319 end = au->buf->vec.iov_base + au->buf->vec.iov_len; in ceph_x_build_authorizer()
321 get_random_bytes(&au->nonce, sizeof(au->nonce)); in ceph_x_build_authorizer()
323 msg_b.nonce = cpu_to_le64(au->nonce); in ceph_x_build_authorizer()
329 au->buf->vec.iov_len = p - au->buf->vec.iov_base; in ceph_x_build_authorizer()
330 dout(" built authorizer nonce %llx len %d\n", au->nonce, in ceph_x_build_authorizer()
331 (int)au->buf->vec.iov_len); in ceph_x_build_authorizer()
332 BUG_ON(au->buf->vec.iov_len > maxlen); in ceph_x_build_authorizer()
336 ceph_buffer_put(au->buf); in ceph_x_build_authorizer()
337 au->buf = NULL; in ceph_x_build_authorizer()
532 struct ceph_x_authorizer *au; in ceph_x_create_authorizer() local
540 au = kzalloc(sizeof(*au), GFP_NOFS); in ceph_x_create_authorizer()
541 if (!au) in ceph_x_create_authorizer()
544 ret = ceph_x_build_authorizer(ac, th, au); in ceph_x_create_authorizer()
546 kfree(au); in ceph_x_create_authorizer()
550 auth->authorizer = (struct ceph_authorizer *) au; in ceph_x_create_authorizer()
551 auth->authorizer_buf = au->buf->vec.iov_base; in ceph_x_create_authorizer()
552 auth->authorizer_buf_len = au->buf->vec.iov_len; in ceph_x_create_authorizer()
553 auth->authorizer_reply_buf = au->reply_buf; in ceph_x_create_authorizer()
554 auth->authorizer_reply_buf_len = sizeof (au->reply_buf); in ceph_x_create_authorizer()
563 struct ceph_x_authorizer *au; in ceph_x_update_authorizer() local
570 au = (struct ceph_x_authorizer *)auth->authorizer; in ceph_x_update_authorizer()
571 if (au->secret_id < th->secret_id) { in ceph_x_update_authorizer()
573 au->service, au->secret_id, th->secret_id); in ceph_x_update_authorizer()
574 return ceph_x_build_authorizer(ac, th, au); in ceph_x_update_authorizer()
582 struct ceph_x_authorizer *au = (void *)a; in ceph_x_verify_authorizer_reply() local
586 void *p = au->reply_buf; in ceph_x_verify_authorizer_reply()
587 void *end = p + sizeof(au->reply_buf); in ceph_x_verify_authorizer_reply()
589 th = get_ticket_handler(ac, au->service); in ceph_x_verify_authorizer_reply()
598 if (au->nonce + 1 != le64_to_cpu(reply.nonce_plus_one)) in ceph_x_verify_authorizer_reply()
603 au->nonce, le64_to_cpu(reply.nonce_plus_one), ret); in ceph_x_verify_authorizer_reply()
610 struct ceph_x_authorizer *au = (void *)a; in ceph_x_destroy_authorizer() local
612 ceph_buffer_put(au->buf); in ceph_x_destroy_authorizer()
613 kfree(au); in ceph_x_destroy_authorizer()