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>
This commit is contained in:
Venkateswararao Jujjuri (JV) 2010-06-14 13:34:42 -07:00 committed by Anthony Liguori
parent 758e8e38eb
commit e95ead32ef
3 changed files with 12 additions and 6 deletions

View file

@ -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)