aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ceph
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ceph')
-rw-r--r--fs/ceph/auth.c3
-rw-r--r--fs/ceph/auth_none.c1
2 files changed, 4 insertions, 0 deletions
diff --git a/fs/ceph/auth.c b/fs/ceph/auth.c
index d5872d4f92bf..b34ce0e41b4c 100644
--- a/fs/ceph/auth.c
+++ b/fs/ceph/auth.c
@@ -107,8 +107,11 @@ int ceph_auth_build_hello(struct ceph_auth_client *ac, void *buf, size_t len)
107 lenp = p; 107 lenp = p;
108 p += sizeof(u32); 108 p += sizeof(u32);
109 109
110 ceph_decode_need(&p, end, 1 + sizeof(u32), bad);
111 ceph_encode_8(&p, 1);
110 num = ARRAY_SIZE(supported_protocols); 112 num = ARRAY_SIZE(supported_protocols);
111 ceph_encode_32(&p, num); 113 ceph_encode_32(&p, num);
114 ceph_decode_need(&p, end, num * sizeof(u32), bad);
112 for (i = 0; i < num; i++) 115 for (i = 0; i < num; i++)
113 ceph_encode_32(&p, supported_protocols[i]); 116 ceph_encode_32(&p, supported_protocols[i]);
114 117
diff --git a/fs/ceph/auth_none.c b/fs/ceph/auth_none.c
index 631017eb7117..b4ef6f0a6c85 100644
--- a/fs/ceph/auth_none.c
+++ b/fs/ceph/auth_none.c
@@ -62,6 +62,7 @@ static int ceph_auth_none_create_authorizer(
62 if (!ai->built_authorizer) { 62 if (!ai->built_authorizer) {
63 p = au->buf; 63 p = au->buf;
64 end = p + sizeof(au->buf); 64 end = p + sizeof(au->buf);
65 ceph_encode_8(&p, 1);
65 ret = ceph_entity_name_encode(ac->name, &p, end - 8); 66 ret = ceph_entity_name_encode(ac->name, &p, end - 8);
66 if (ret < 0) 67 if (ret < 0)
67 goto bad; 68 goto bad;