summaryrefslogtreecommitdiff
path: root/hw/virtio-9p.c
diff options
context:
space:
mode:
authorVenkateswararao Jujjuri (JV) <jvrao@linux.vnet.ibm.com>2010-06-14 13:34:42 -0700
committerAnthony Liguori <aliguori@us.ibm.com>2010-06-22 15:15:50 -0500
commite95ead32efc48157de12e0a257ea1c52541a6ce1 (patch)
tree863af9db5393b508315b5d8a762426f3ea036444 /hw/virtio-9p.c
parent758e8e38eb582e3dc87fd55a1d234c25108a7b7f (diff)
downloadqemu-e95ead32efc48157de12e0a257ea1c52541a6ce1.tar.gz
qemu-e95ead32efc48157de12e0a257ea1c52541a6ce1.tar.bz2
qemu-e95ead32efc48157de12e0a257ea1c52541a6ce1.zip
virtio-9p: Security model for chmod
Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/virtio-9p.c')
-rw-r--r--hw/virtio-9p.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/hw/virtio-9p.c b/hw/virtio-9p.c
index a7ba4b6abb..24291f4860 100644
--- a/hw/virtio-9p.c
+++ b/hw/virtio-9p.c
@@ -154,7 +154,10 @@ static int v9fs_do_writev(V9fsState *s, int fd, const struct iovec *iov,
static int v9fs_do_chmod(V9fsState *s, V9fsString *path, mode_t mode)
{
- return s->ops->chmod(&s->ctx, path->data, mode);
+ FsCred cred;
+ cred_init(&cred);
+ cred.fc_mode = mode;
+ return s->ops->chmod(&s->ctx, path->data, &cred);
}
static int v9fs_do_mknod(V9fsState *s, V9fsString *path, mode_t mode, dev_t dev)