From 861582dc844550109ae14b576636164aafee4f5e Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Thu, 4 Feb 2010 09:42:20 -0800 Subject: [PATCH] --- yaml --- r: 188693 b: refs/heads/master c: 07c8739c521cb029d0f3549556aae2d304513978 h: refs/heads/master i: 188691: 7e22f60a5457a2f5c035a2077b95a733c4b90e05 v: v3 --- [refs] | 2 +- trunk/fs/ceph/auth.c | 3 +++ trunk/fs/ceph/auth_none.c | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index b84c7cc5ef81..9d130df14c97 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 9bd2e6f8ba71facf1cadb7154a7e0e4d345a6aba +refs/heads/master: 07c8739c521cb029d0f3549556aae2d304513978 diff --git a/trunk/fs/ceph/auth.c b/trunk/fs/ceph/auth.c index d5872d4f92bf..b34ce0e41b4c 100644 --- a/trunk/fs/ceph/auth.c +++ b/trunk/fs/ceph/auth.c @@ -107,8 +107,11 @@ int ceph_auth_build_hello(struct ceph_auth_client *ac, void *buf, size_t len) lenp = p; p += sizeof(u32); + ceph_decode_need(&p, end, 1 + sizeof(u32), bad); + ceph_encode_8(&p, 1); num = ARRAY_SIZE(supported_protocols); ceph_encode_32(&p, num); + ceph_decode_need(&p, end, num * sizeof(u32), bad); for (i = 0; i < num; i++) ceph_encode_32(&p, supported_protocols[i]); diff --git a/trunk/fs/ceph/auth_none.c b/trunk/fs/ceph/auth_none.c index 631017eb7117..b4ef6f0a6c85 100644 --- a/trunk/fs/ceph/auth_none.c +++ b/trunk/fs/ceph/auth_none.c @@ -62,6 +62,7 @@ static int ceph_auth_none_create_authorizer( if (!ai->built_authorizer) { p = au->buf; end = p + sizeof(au->buf); + ceph_encode_8(&p, 1); ret = ceph_entity_name_encode(ac->name, &p, end - 8); if (ret < 0) goto bad;