From 09ad04d52e2e9ca70561be78b03a29dc00b21f30 Mon Sep 17 00:00:00 2001 From: Venky Shankar Date: Wed, 14 Sep 2022 00:01:13 -0400 Subject: [PATCH] client: use parent directory POSIX ACLs for snaphot dir Fixes: http://tracker.ceph.com/issues/57084 Signed-off-by: Venky Shankar --- src/client/Client.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/client/Client.cc b/src/client/Client.cc index fd3f83ac91720..997f147fec7f8 100644 --- a/src/client/Client.cc +++ b/src/client/Client.cc @@ -11936,6 +11936,12 @@ Inode *Client::open_snapdir(Inode *diri) in->dirfragtree.clear(); in->snapdir_parent = diri; + // copy posix acls to snapshotted inode + for (auto &[xattr_key, xattr_value] : diri->xattrs) { + if (xattr_key.rfind("system.", 0) == 0) { + in->xattrs[xattr_key] = xattr_value; + } + } diri->flags |= I_SNAPDIR_OPEN; inode_map[vino] = in; if (use_faked_inos()) -- 2.39.5