osd_client.c (6c4a19158b96ea1fb8acbe0c1d5493d9dcd2f147) | osd_client.c (74f1869f76d043bad12ec03b4d5f04a8c3d1f157) |
---|---|
1#include <linux/ceph/ceph_debug.h> 2 3#include <linux/module.h> 4#include <linux/err.h> 5#include <linux/highmem.h> 6#include <linux/mm.h> 7#include <linux/pagemap.h> 8#include <linux/slab.h> --- 2101 unchanged lines hidden (view full) --- 2110 */ 2111static int get_authorizer(struct ceph_connection *con, 2112 void **buf, int *len, int *proto, 2113 void **reply_buf, int *reply_len, int force_new) 2114{ 2115 struct ceph_osd *o = con->private; 2116 struct ceph_osd_client *osdc = o->o_osdc; 2117 struct ceph_auth_client *ac = osdc->client->monc.auth; | 1#include <linux/ceph/ceph_debug.h> 2 3#include <linux/module.h> 4#include <linux/err.h> 5#include <linux/highmem.h> 6#include <linux/mm.h> 7#include <linux/pagemap.h> 8#include <linux/slab.h> --- 2101 unchanged lines hidden (view full) --- 2110 */ 2111static int get_authorizer(struct ceph_connection *con, 2112 void **buf, int *len, int *proto, 2113 void **reply_buf, int *reply_len, int force_new) 2114{ 2115 struct ceph_osd *o = con->private; 2116 struct ceph_osd_client *osdc = o->o_osdc; 2117 struct ceph_auth_client *ac = osdc->client->monc.auth; |
2118 struct ceph_auth_handshake *auth = &o->o_auth; |
|
2118 int ret = 0; 2119 | 2119 int ret = 0; 2120 |
2120 if (force_new && o->o_auth.authorizer) { 2121 ac->ops->destroy_authorizer(ac, o->o_auth.authorizer); 2122 o->o_auth.authorizer = NULL; | 2121 if (force_new && auth->authorizer) { 2122 ac->ops->destroy_authorizer(ac, auth->authorizer); 2123 auth->authorizer = NULL; |
2123 } | 2124 } |
2124 if (o->o_auth.authorizer == NULL) { 2125 ret = ac->ops->create_authorizer( 2126 ac, CEPH_ENTITY_TYPE_OSD, 2127 &o->o_auth.authorizer, 2128 &o->o_auth.authorizer_buf, 2129 &o->o_auth.authorizer_buf_len, 2130 &o->o_auth.authorizer_reply_buf, 2131 &o->o_auth.authorizer_reply_buf_len); | 2125 if (auth->authorizer == NULL) { 2126 ret = ac->ops->create_authorizer(ac, CEPH_ENTITY_TYPE_OSD, auth); |
2132 if (ret) 2133 return ret; 2134 } 2135 2136 *proto = ac->protocol; | 2127 if (ret) 2128 return ret; 2129 } 2130 2131 *proto = ac->protocol; |
2137 *buf = o->o_auth.authorizer_buf; 2138 *len = o->o_auth.authorizer_buf_len; 2139 *reply_buf = o->o_auth.authorizer_reply_buf; 2140 *reply_len = o->o_auth.authorizer_reply_buf_len; | 2132 *buf = auth->authorizer_buf; 2133 *len = auth->authorizer_buf_len; 2134 *reply_buf = auth->authorizer_reply_buf; 2135 *reply_len = auth->authorizer_reply_buf_len; 2136 |
2141 return 0; 2142} 2143 2144 2145static int verify_authorizer_reply(struct ceph_connection *con, int len) 2146{ 2147 struct ceph_osd *o = con->private; 2148 struct ceph_osd_client *osdc = o->o_osdc; --- 27 unchanged lines hidden --- | 2137 return 0; 2138} 2139 2140 2141static int verify_authorizer_reply(struct ceph_connection *con, int len) 2142{ 2143 struct ceph_osd *o = con->private; 2144 struct ceph_osd_client *osdc = o->o_osdc; --- 27 unchanged lines hidden --- |