]> git.ipfire.org Git - thirdparty/kernel/stable.git/blobdiff - net/ceph/osd_client.c
libceph: add authorizer challenge
[thirdparty/kernel/stable.git] / net / ceph / osd_client.c
index 8002b8e9ce2472f77412726c8978d194d4f19fb0..60934bd8796c53c5ec96477e1c29fb9e8234e804 100644 (file)
@@ -5393,6 +5393,16 @@ static struct ceph_auth_handshake *get_authorizer(struct ceph_connection *con,
        return auth;
 }
 
+static int add_authorizer_challenge(struct ceph_connection *con,
+                                   void *challenge_buf, int challenge_buf_len)
+{
+       struct ceph_osd *o = con->private;
+       struct ceph_osd_client *osdc = o->o_osdc;
+       struct ceph_auth_client *ac = osdc->client->monc.auth;
+
+       return ceph_auth_add_authorizer_challenge(ac, o->o_auth.authorizer,
+                                           challenge_buf, challenge_buf_len);
+}
 
 static int verify_authorizer_reply(struct ceph_connection *con)
 {
@@ -5442,6 +5452,7 @@ static const struct ceph_connection_operations osd_con_ops = {
        .put = put_osd_con,
        .dispatch = dispatch,
        .get_authorizer = get_authorizer,
+       .add_authorizer_challenge = add_authorizer_challenge,
        .verify_authorizer_reply = verify_authorizer_reply,
        .invalidate_authorizer = invalidate_authorizer,
        .alloc_msg = alloc_msg,