]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
libcephfs_proxy: fix userperm pointer decoding for older protocols
authorXavi Hernandez <xhernandez@gmail.com>
Mon, 1 Sep 2025 12:43:26 +0000 (14:43 +0200)
committerXavi Hernandez <xhernandez@gmail.com>
Wed, 10 Sep 2025 08:03:00 +0000 (10:03 +0200)
The random data used to decode pointers coming from the old protocol was
taken from the client instead of using the global_random data, which is
the correct one.

Fixes: https://tracker.ceph.com/issues/72800
Signed-off-by: Xavi Hernandez <xhernandez@gmail.com>
(cherry picked from commit 674bd44001d6feb919a331d4a4586cc0d97847f8)

src/libcephfs_proxy/libcephfsd.c

index 503019dc62c44c95f037f3bb8bb35bc0d03dc130..64a3f888cd8653a728c5dffdff6236d662807d46 100644 (file)
@@ -89,7 +89,7 @@ static int32_t validate_perms(proxy_client_t *client, embedded_perms_t *embed,
 
        if ((client->neg.v1.enabled & PROXY_FEAT_EMBEDDED_PERMS) == 0) {
                *embedded = false;
-               return ptr_check(&client->random, embed->ptr, (void **)pperms);
+               return ptr_check(&global_random, embed->ptr, (void **)pperms);
        }
 
        perms = ceph_userperm_new(embed->uid, embed->gid, count,