[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH -V5 22/28] virtio-9p: Use lchown which won't follow
From: |
Venkateswararao Jujjuri (JV) |
Subject: |
[Qemu-devel] [PATCH -V5 22/28] virtio-9p: Use lchown which won't follow symlink |
Date: |
Thu, 2 Sep 2010 12:39:42 -0700 |
From: Aneesh Kumar K.V <address@hidden>
We should always use functions which don't follow
symlink on the server
Signed-off-by: Aneesh Kumar K.V <address@hidden>
Signed-off-by: Venkateswararao Jujjuri <address@hidden>
---
hw/virtio-9p-local.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/hw/virtio-9p-local.c b/hw/virtio-9p-local.c
index 58e7647..132816e 100644
--- a/hw/virtio-9p-local.c
+++ b/hw/virtio-9p-local.c
@@ -101,7 +101,7 @@ static int local_post_create_passthrough(FsContext *fs_ctx,
const char *path,
if (chmod(rpath(fs_ctx, path), credp->fc_mode & 07777) < 0) {
return -1;
}
- if (chown(rpath(fs_ctx, path), credp->fc_uid, credp->fc_gid) < 0) {
+ if (lchown(rpath(fs_ctx, path), credp->fc_uid, credp->fc_gid) < 0) {
/*
* If we fail to change ownership and if we are
* using security model none. Ignore the error
--
1.6.5.2
- [Qemu-devel] [PATCH -V5 12/28] [virtio-9p] This patch implements TLCREATE for 9p2000.L protocol., (continued)
- [Qemu-devel] [PATCH -V5 12/28] [virtio-9p] This patch implements TLCREATE for 9p2000.L protocol., Venkateswararao Jujjuri (JV), 2010/09/02
- [Qemu-devel] [PATCH -V5 10/28] [virtio-9p] Implement TLINK for 9P2000.L, Venkateswararao Jujjuri (JV), 2010/09/02
- [Qemu-devel] [PATCH -V5 11/28] [virtio-9p] Define and implement TSYMLINK for 9P2000.L, Venkateswararao Jujjuri (JV), 2010/09/02
- [Qemu-devel] [PATCH -V5 15/28] rename - change name of file or directory, Venkateswararao Jujjuri (JV), 2010/09/02
- [Qemu-devel] [PATCH -V5 16/28] [virtio-9p] qemu: virtio-9p: Implement LOPEN, Venkateswararao Jujjuri (JV), 2010/09/02
- [Qemu-devel] [PATCH -V5 13/28] qemu: virtio-9p: Implement TMKNOD, Venkateswararao Jujjuri (JV), 2010/09/02
- [Qemu-devel] [PATCH -V5 17/28] virtio-9p: Add fidtype so that we can do type specific operation, Venkateswararao Jujjuri (JV), 2010/09/02
- [Qemu-devel] [PATCH -V5 14/28] qemu: virtio-9p: Implement TMKDIR, Venkateswararao Jujjuri (JV), 2010/09/02
- [Qemu-devel] [PATCH -V5 18/28] virtio-9p: Implement TXATTRWALK, Venkateswararao Jujjuri (JV), 2010/09/02
- [Qemu-devel] [PATCH -V5 20/28] virtio-9p: Hide user.virtfs xattr in case of mapped security., Venkateswararao Jujjuri (JV), 2010/09/02
- [Qemu-devel] [PATCH -V5 22/28] virtio-9p: Use lchown which won't follow symlink,
Venkateswararao Jujjuri (JV) <=
- [Qemu-devel] [PATCH -V5 19/28] virtio-9p: Implement TXATTRCREATE, Venkateswararao Jujjuri (JV), 2010/09/02
- [Qemu-devel] [PATCH -V5 23/28] virtio-9p: Fix the memset usage, Venkateswararao Jujjuri (JV), 2010/09/02
- [Qemu-devel] [PATCH -V5 24/28] virtio-9p: Add support for removing xattr, Venkateswararao Jujjuri (JV), 2010/09/02
- [Qemu-devel] [PATCH -V5 25/28] virtio-9p: Make sure -virtfs option works correctly, Venkateswararao Jujjuri (JV), 2010/09/02
- [Qemu-devel] [PATCH -V5 26/28] [virtio-9p] Remove all instances of unnecessary dotu variable., Venkateswararao Jujjuri (JV), 2010/09/02
- [Qemu-devel] [PATCH -V5 21/28] virtio-9p: Add SM_NONE security model, Venkateswararao Jujjuri (JV), 2010/09/02
- [Qemu-devel] [PATCH -V5 27/28] [virtio-9p] This patch implements TLERROR/RLERROR on the qemu 9P server., Venkateswararao Jujjuri (JV), 2010/09/02
- [Qemu-devel] [PATCH -V5 28/28] virtio-9p: Change handling of flags in open() path for 9P2000.L, Venkateswararao Jujjuri (JV), 2010/09/02