mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 09:43:56 -06:00
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:
parent
758e8e38eb
commit
e95ead32ef
3 changed files with 12 additions and 6 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue