aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ceph/osd_client.c
diff options
context:
space:
mode:
authorSage Weil <sage@newdream.net>2010-02-02 19:21:06 -0500
committerSage Weil <sage@newdream.net>2010-02-10 18:04:47 -0500
commit9bd2e6f8ba71facf1cadb7154a7e0e4d345a6aba (patch)
tree1c1bb4d2f769eca05443b98334fe0fbdb3b977c2 /fs/ceph/osd_client.c
parent8b6e4f2d8b21c25225b1ce8d53a2e03b92cc8522 (diff)
ceph: allow renewal of auth credentials
Add infrastructure to allow the mon_client to periodically renew its auth credentials. Also add a messenger callback that will force such a renewal if a peer rejects our authenticator. Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net> Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'fs/ceph/osd_client.c')
-rw-r--r--fs/ceph/osd_client.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/fs/ceph/osd_client.c b/fs/ceph/osd_client.c
index 944759b3079f..35c8afea13ec 100644
--- a/fs/ceph/osd_client.c
+++ b/fs/ceph/osd_client.c
@@ -1448,6 +1448,17 @@ static int verify_authorizer_reply(struct ceph_connection *con, int len)
1448 return ac->ops->verify_authorizer_reply(ac, o->o_authorizer, len); 1448 return ac->ops->verify_authorizer_reply(ac, o->o_authorizer, len);
1449} 1449}
1450 1450
1451static int invalidate_authorizer(struct ceph_connection *con)
1452{
1453 struct ceph_osd *o = con->private;
1454 struct ceph_osd_client *osdc = o->o_osdc;
1455 struct ceph_auth_client *ac = osdc->client->monc.auth;
1456
1457 if (ac->ops->invalidate_authorizer)
1458 ac->ops->invalidate_authorizer(ac, CEPH_ENTITY_TYPE_OSD);
1459
1460 return ceph_monc_validate_auth(&osdc->client->monc);
1461}
1451 1462
1452const static struct ceph_connection_operations osd_con_ops = { 1463const static struct ceph_connection_operations osd_con_ops = {
1453 .get = get_osd_con, 1464 .get = get_osd_con,
@@ -1455,6 +1466,7 @@ const static struct ceph_connection_operations osd_con_ops = {
1455 .dispatch = dispatch, 1466 .dispatch = dispatch,
1456 .get_authorizer = get_authorizer, 1467 .get_authorizer = get_authorizer,
1457 .verify_authorizer_reply = verify_authorizer_reply, 1468 .verify_authorizer_reply = verify_authorizer_reply,
1469 .invalidate_authorizer = invalidate_authorizer,
1458 .alloc_msg = alloc_msg, 1470 .alloc_msg = alloc_msg,
1459 .fault = osd_reset, 1471 .fault = osd_reset,
1460}; 1472};