mirror of
https://github.com/containers/fuse-overlayfs.git
synced 2025-09-09 07:16:11 -04:00
fuse-overlayfs: do not allow to overwrite user.fuseoverlayfs xattrs
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
parent
6e7b5d70fd
commit
358873e18b
7
main.c
7
main.c
@ -60,6 +60,7 @@
|
||||
#define ATTR_TIMEOUT 1000000000.0
|
||||
#define ENTRY_TIMEOUT 1000000000.0
|
||||
|
||||
#define XATTR_PREFIX "user.fuseoverlayfs"
|
||||
#define REDIRECT_XATTR "user.fuseoverlayfs.redirect"
|
||||
|
||||
#define NODE_TO_INODE(x) ((fuse_ino_t) x)
|
||||
@ -1897,6 +1898,12 @@ ovl_setxattr (fuse_req_t req, fuse_ino_t ino, const char *name,
|
||||
fprintf (stderr, "ovl_setxattr(ino=%" PRIu64 "s, name=%s, value=%s, size=%zu, flags=%d)\n", ino, name,
|
||||
value, size, flags);
|
||||
|
||||
if (has_prefix (name, XATTR_PREFIX))
|
||||
{
|
||||
fuse_reply_err (req, EPERM);
|
||||
return;
|
||||
}
|
||||
|
||||
node = do_lookup_file (lo, ino, NULL);
|
||||
if (node == NULL)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user