diff options
author | Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> | 2010-10-18 15:28:16 +0530 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2010-10-20 12:10:58 -0500 |
commit | 70fc55ebe4fe5e72802468f16ae09169cf323b04 (patch) | |
tree | 8025ee78f471d7db195a3f546dd3ca2912695781 /hw/virtio-9p-xattr-user.c | |
parent | fc22118d9bb56ec71655b936a29513c140e6c289 (diff) |
virtio-9p: Support mapped posix acl
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
Diffstat (limited to 'hw/virtio-9p-xattr-user.c')
-rw-r--r-- | hw/virtio-9p-xattr-user.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/hw/virtio-9p-xattr-user.c b/hw/virtio-9p-xattr-user.c index b14dbb9a61..faa02a1911 100644 --- a/hw/virtio-9p-xattr-user.c +++ b/hw/virtio-9p-xattr-user.c @@ -37,11 +37,19 @@ static ssize_t mp_user_listxattr(FsContext *ctx, const char *path, { int name_size = strlen(name) + 1; if (strncmp(name, "user.virtfs.", 12) == 0) { - /* - * Don't allow fetch of user.virtfs namesapce - * in case of mapped security - */ - return 0; + + /* check if it is a mapped posix acl */ + if (strncmp(name, "user.virtfs.system.posix_acl_", 29) == 0) { + /* adjust the name and size */ + name += 12; + name_size -= 12; + } else { + /* + * Don't allow fetch of user.virtfs namesapce + * in case of mapped security + */ + return 0; + } } if (!value) { return name_size; |