mds_client.c (6c4a19158b96ea1fb8acbe0c1d5493d9dcd2f147) | mds_client.c (74f1869f76d043bad12ec03b4d5f04a8c3d1f157) |
---|---|
1#include <linux/ceph/ceph_debug.h> 2 3#include <linux/fs.h> 4#include <linux/wait.h> 5#include <linux/slab.h> 6#include <linux/sched.h> 7#include <linux/debugfs.h> 8#include <linux/seq_file.h> --- 3388 unchanged lines hidden (view full) --- 3397 */ 3398static int get_authorizer(struct ceph_connection *con, 3399 void **buf, int *len, int *proto, 3400 void **reply_buf, int *reply_len, int force_new) 3401{ 3402 struct ceph_mds_session *s = con->private; 3403 struct ceph_mds_client *mdsc = s->s_mdsc; 3404 struct ceph_auth_client *ac = mdsc->fsc->client->monc.auth; | 1#include <linux/ceph/ceph_debug.h> 2 3#include <linux/fs.h> 4#include <linux/wait.h> 5#include <linux/slab.h> 6#include <linux/sched.h> 7#include <linux/debugfs.h> 8#include <linux/seq_file.h> --- 3388 unchanged lines hidden (view full) --- 3397 */ 3398static int get_authorizer(struct ceph_connection *con, 3399 void **buf, int *len, int *proto, 3400 void **reply_buf, int *reply_len, int force_new) 3401{ 3402 struct ceph_mds_session *s = con->private; 3403 struct ceph_mds_client *mdsc = s->s_mdsc; 3404 struct ceph_auth_client *ac = mdsc->fsc->client->monc.auth; |
3405 struct ceph_auth_handshake *auth = &s->s_auth; |
|
3405 int ret = 0; 3406 | 3406 int ret = 0; 3407 |
3407 if (force_new && s->s_auth.authorizer) { 3408 ac->ops->destroy_authorizer(ac, s->s_auth.authorizer); 3409 s->s_auth.authorizer = NULL; | 3408 if (force_new && auth->authorizer) { 3409 ac->ops->destroy_authorizer(ac, auth->authorizer); 3410 auth->authorizer = NULL; |
3410 } | 3411 } |
3411 if (s->s_auth.authorizer == NULL) { | 3412 if (auth->authorizer == NULL) { |
3412 if (ac->ops->create_authorizer) { | 3413 if (ac->ops->create_authorizer) { |
3413 ret = ac->ops->create_authorizer( 3414 ac, CEPH_ENTITY_TYPE_MDS, 3415 &s->s_auth.authorizer, 3416 &s->s_auth.authorizer_buf, 3417 &s->s_auth.authorizer_buf_len, 3418 &s->s_auth.authorizer_reply_buf, 3419 &s->s_auth.authorizer_reply_buf_len); | 3414 ret = ac->ops->create_authorizer(ac, 3415 CEPH_ENTITY_TYPE_MDS, auth); |
3420 if (ret) 3421 return ret; 3422 } 3423 } 3424 3425 *proto = ac->protocol; | 3416 if (ret) 3417 return ret; 3418 } 3419 } 3420 3421 *proto = ac->protocol; |
3426 *buf = s->s_auth.authorizer_buf; 3427 *len = s->s_auth.authorizer_buf_len; 3428 *reply_buf = s->s_auth.authorizer_reply_buf; 3429 *reply_len = s->s_auth.authorizer_reply_buf_len; | 3422 *buf = auth->authorizer_buf; 3423 *len = auth->authorizer_buf_len; 3424 *reply_buf = auth->authorizer_reply_buf; 3425 *reply_len = auth->authorizer_reply_buf_len; 3426 |
3430 return 0; 3431} 3432 3433 3434static int verify_authorizer_reply(struct ceph_connection *con, int len) 3435{ 3436 struct ceph_mds_session *s = con->private; 3437 struct ceph_mds_client *mdsc = s->s_mdsc; --- 28 unchanged lines hidden --- | 3427 return 0; 3428} 3429 3430 3431static int verify_authorizer_reply(struct ceph_connection *con, int len) 3432{ 3433 struct ceph_mds_session *s = con->private; 3434 struct ceph_mds_client *mdsc = s->s_mdsc; --- 28 unchanged lines hidden --- |