mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 08:13:54 -06:00
virtio-9p: Add support for removing xattr
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
This commit is contained in:
parent
783f04e1d4
commit
9ed3ef26e6
3 changed files with 38 additions and 5 deletions
|
@ -581,6 +581,22 @@ static int local_lsetxattr(FsContext *ctx, const char *path, const char *name,
|
|||
return lsetxattr(rpath(ctx, path), name, value, size, flags);
|
||||
}
|
||||
|
||||
static int local_lremovexattr(FsContext *ctx,
|
||||
const char *path, const char *name)
|
||||
{
|
||||
if ((ctx->fs_sm == SM_MAPPED) &&
|
||||
(strncmp(name, "user.virtfs.", 12) == 0)) {
|
||||
/*
|
||||
* Don't allow fetch of user.virtfs namesapce
|
||||
* in case of mapped security
|
||||
*/
|
||||
errno = EACCES;
|
||||
return -1;
|
||||
}
|
||||
return lremovexattr(rpath(ctx, path), name);
|
||||
}
|
||||
|
||||
|
||||
FileOperations local_ops = {
|
||||
.lstat = local_lstat,
|
||||
.readlink = local_readlink,
|
||||
|
@ -612,4 +628,5 @@ FileOperations local_ops = {
|
|||
.lgetxattr = local_lgetxattr,
|
||||
.llistxattr = local_llistxattr,
|
||||
.lsetxattr = local_lsetxattr,
|
||||
.lremovexattr = local_lremovexattr,
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue