mirror of
https://github.com/ceph/ceph
synced 2024-12-25 21:03:31 +00:00
libcephfs: fix ClearSetuid incorrectly using SETATTR_MODE mask
Both the STATX_MODE and SETATTR_MODE equal 1, so the test didn't fail. Fixes: https://tracker.ceph.com/issues/58680 Signed-off-by: Xiubo Li <xiubli@redhat.com>
This commit is contained in:
parent
c5153d77fa
commit
463b932fff
@ -2116,7 +2116,7 @@ TEST(LibCephFS, ClearSetuid) {
|
||||
stx.stx_gid = g;
|
||||
mode_t m = S_ISGID|S_ISUID|S_IRUSR|S_IWUSR;
|
||||
stx.stx_mode = m;
|
||||
ASSERT_EQ(ceph_ll_setattr(cmount, in, &stx, CEPH_STATX_MODE|CEPH_SETATTR_UID|CEPH_SETATTR_GID, rootcred), 0);
|
||||
ASSERT_EQ(ceph_ll_setattr(cmount, in, &stx, CEPH_SETATTR_MODE|CEPH_SETATTR_UID|CEPH_SETATTR_GID, rootcred), 0);
|
||||
ASSERT_EQ(ceph_ll_getattr(cmount, in, &stx, CEPH_STATX_MODE, 0, altcred), 0);
|
||||
ASSERT_EQ(stx.stx_mode&(mode_t)ALLPERMS, m);
|
||||
/* not dropped without exe bit */
|
||||
|
Loading…
Reference in New Issue
Block a user