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 | 817d68b20f0c0b3018b374acc5a3b350e6955b8c (patch) | |
tree | 0ca3caea259961bb1a3048bd3794f77f5edf74d5 /hw/virtio-9p.c | |
parent | 1acfa8587e4797191708f2512851f0a9655d46d1 (diff) | |
download | qemu-817d68b20f0c0b3018b374acc5a3b350e6955b8c.tar.gz qemu-817d68b20f0c0b3018b374acc5a3b350e6955b8c.tar.bz2 qemu-817d68b20f0c0b3018b374acc5a3b350e6955b8c.zip |
virtio-9p: Use layered xattr approach
We would need this to make sure we handle the mapped
security model correctly for different xattr names.
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.c')
-rw-r--r-- | hw/virtio-9p.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/hw/virtio-9p.c b/hw/virtio-9p.c index cb6366bcc6..4586ccefb4 100644 --- a/hw/virtio-9p.c +++ b/hw/virtio-9p.c @@ -17,6 +17,7 @@ #include "virtio-9p.h" #include "fsdev/qemu-fsdev.h" #include "virtio-9p-debug.h" +#include "virtio-9p-xattr.h" int debug_9p_pdu; @@ -3712,23 +3713,26 @@ VirtIODevice *virtio_9p_init(DeviceState *dev, V9fsConf *conf) if (!strcmp(fse->security_model, "passthrough")) { /* Files on the Fileserver set to client user credentials */ s->ctx.fs_sm = SM_PASSTHROUGH; + s->ctx.xops = passthrough_xattr_ops; } else if (!strcmp(fse->security_model, "mapped")) { /* Files on the fileserver are set to QEMU credentials. * Client user credentials are saved in extended attributes. */ s->ctx.fs_sm = SM_MAPPED; + s->ctx.xops = mapped_xattr_ops; } else if (!strcmp(fse->security_model, "none")) { /* * Files on the fileserver are set to QEMU credentials. */ s->ctx.fs_sm = SM_NONE; - + s->ctx.xops = none_xattr_ops; } else { fprintf(stderr, "Default to security_model=none. You may want" " enable advanced security model using " "security option:\n\t security_model=passthrough \n\t " "security_model=mapped\n"); s->ctx.fs_sm = SM_NONE; + s->ctx.xops = none_xattr_ops; } if (lstat(fse->path, &stat)) { |