• Home
  • Raw
  • Download

Lines Matching refs:ret

54 	int ret;  in ceph_x_encrypt()  local
56 ret = ceph_encrypt2(secret, obuf + sizeof(u32), &len, in ceph_x_encrypt()
58 if (ret) in ceph_x_encrypt()
59 return ret; in ceph_x_encrypt()
69 int len, ret; in ceph_x_decrypt() local
83 ret = ceph_decrypt2(secret, &head, &head_len, *obuf, &olen, *p, len); in ceph_x_decrypt()
84 if (ret) in ceph_x_decrypt()
85 return ret; in ceph_x_decrypt()
158 int ret; in process_one_ticket() local
171 ret = PTR_ERR(th); in process_one_ticket()
178 ret = dlen; in process_one_ticket()
190 ret = ceph_crypto_key_decode(&new_session_key, &dp, dend); in process_one_ticket()
191 if (ret) in process_one_ticket()
208 ret = dlen; in process_one_ticket()
224 ret = ceph_decode_buffer(&new_ticket_blob, ptp, tpend); in process_one_ticket()
225 if (ret) in process_one_ticket()
246 return ret; in process_one_ticket()
249 ret = -EINVAL; in process_one_ticket()
260 int ret; in ceph_x_proc_ticket_reply() local
270 ret = process_one_ticket(ac, secret, &p, end); in ceph_x_proc_ticket_reply()
271 if (ret) in ceph_x_proc_ticket_reply()
272 return ret; in ceph_x_proc_ticket_reply()
289 int ret; in ceph_x_build_authorizer() local
332 ret = ceph_x_encrypt(&th->session_key, &msg_b, sizeof(msg_b), in ceph_x_build_authorizer()
334 if (ret < 0) in ceph_x_build_authorizer()
336 p += ret; in ceph_x_build_authorizer()
346 return ret; in ceph_x_build_authorizer()
408 int ret; in ceph_x_build_request() local
437 ret = ceph_x_encrypt(&xi->secret, &tmp, sizeof(tmp), in ceph_x_build_request()
439 if (ret < 0) in ceph_x_build_request()
440 return ret; in ceph_x_build_request()
444 for (u = (u64 *)tmp_enc; u + 1 <= (u64 *)(tmp_enc + ret); u++) in ceph_x_build_request()
451 ret = ceph_x_encode_ticket(th, &p, end); in ceph_x_build_request()
452 if (ret < 0) in ceph_x_build_request()
453 return ret; in ceph_x_build_request()
466 ret = ceph_x_build_authorizer(ac, th, &xi->auth_authorizer); in ceph_x_build_request()
467 if (ret) in ceph_x_build_request()
468 return ret; in ceph_x_build_request()
489 int ret; in ceph_x_handle_reply() local
514 ret = ceph_x_proc_ticket_reply(ac, &xi->secret, in ceph_x_handle_reply()
522 ret = ceph_x_proc_ticket_reply(ac, &th->session_key, in ceph_x_handle_reply()
529 if (ret) in ceph_x_handle_reply()
530 return ret; in ceph_x_handle_reply()
542 int ret; in ceph_x_create_authorizer() local
552 ret = ceph_x_build_authorizer(ac, th, au); in ceph_x_create_authorizer()
553 if (ret) { in ceph_x_create_authorizer()
555 return ret; in ceph_x_create_authorizer()
592 int ret = 0; in ceph_x_verify_authorizer_reply() local
601 ret = ceph_x_decrypt(&th->session_key, &p, end, &preply, sizeof(reply)); in ceph_x_verify_authorizer_reply()
602 if (ret < 0) in ceph_x_verify_authorizer_reply()
603 return ret; in ceph_x_verify_authorizer_reply()
604 if (ret != sizeof(reply)) in ceph_x_verify_authorizer_reply()
608 ret = -EPERM; in ceph_x_verify_authorizer_reply()
610 ret = 0; in ceph_x_verify_authorizer_reply()
612 au->nonce, le64_to_cpu(reply.nonce_plus_one), ret); in ceph_x_verify_authorizer_reply()
613 return ret; in ceph_x_verify_authorizer_reply()
686 int ret; in ceph_x_init() local
689 ret = -ENOMEM; in ceph_x_init()
694 ret = -EINVAL; in ceph_x_init()
700 ret = ceph_crypto_key_clone(&xi->secret, ac->key); in ceph_x_init()
701 if (ret < 0) { in ceph_x_init()
702 pr_err("cannot clone key: %d\n", ret); in ceph_x_init()
717 return ret; in ceph_x_init()