• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src-rt-6.x.4708/linux/linux-2.6/fs/ceph/

Lines Matching defs:ac

23 static int ceph_auth_init_protocol(struct ceph_auth_client *ac, int protocol)
27 return ceph_auth_none_init(ac);
29 return ceph_x_init(ac);
40 struct ceph_auth_client *ac;
46 ac = kzalloc(sizeof(*ac), GFP_NOFS);
47 if (!ac)
50 ac->negotiating = true;
52 ac->name = name;
54 ac->name = CEPH_AUTH_NAME_DEFAULT;
55 dout("auth_init name %s secret %s\n", ac->name, secret);
56 ac->secret = secret;
57 return ac;
63 void ceph_auth_destroy(struct ceph_auth_client *ac)
65 dout("auth_destroy %p\n", ac);
66 if (ac->ops)
67 ac->ops->destroy(ac);
68 kfree(ac);
74 void ceph_auth_reset(struct ceph_auth_client *ac)
76 dout("auth_reset %p\n", ac);
77 if (ac->ops && !ac->negotiating)
78 ac->ops->reset(ac);
79 ac->negotiating = true;
98 int ceph_auth_build_hello(struct ceph_auth_client *ac, void *buf, size_t len)
123 ret = ceph_entity_name_encode(ac->name, &p, end);
127 ceph_encode_64(&p, ac->global_id);
136 static int ceph_build_auth_request(struct ceph_auth_client *ac,
148 ceph_encode_32(&p, ac->protocol);
150 ret = ac->ops->build_request(ac, p + sizeof(u32), end);
153 ac->ops->name);
164 int ceph_handle_auth_reply(struct ceph_auth_client *ac,
199 if (global_id && ac->global_id != global_id) {
200 dout(" set global_id %lld -> %lld\n", ac->global_id, global_id);
201 ac->global_id = global_id;
204 if (ac->negotiating) {
211 if (ac->protocol && ac->protocol != protocol) {
212 ac->ops->destroy(ac);
213 ac->protocol = 0;
214 ac->ops = NULL;
216 if (ac->protocol != protocol) {
217 ret = ceph_auth_init_protocol(ac, protocol);
225 ac->negotiating = false;
228 ret = ac->ops->handle_reply(ac, result, payload, payload_end);
230 return ceph_build_auth_request(ac, reply_buf, reply_len);
232 pr_err("auth method '%s' error %d\n", ac->ops->name, ret);
243 int ceph_build_auth(struct ceph_auth_client *ac,
246 if (!ac->protocol)
247 return ceph_auth_build_hello(ac, msg_buf, msg_len);
248 BUG_ON(!ac->ops);
249 if (ac->ops->should_authenticate(ac))
250 return ceph_build_auth_request(ac, msg_buf, msg_len);
254 int ceph_auth_is_authenticated(struct ceph_auth_client *ac)
256 if (!ac->ops)
258 return ac->ops->is_authenticated(ac);