aboutsummaryrefslogtreecommitdiff
path: root/hw/virtio-9p-local.c
diff options
context:
space:
mode:
authorAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>2010-09-02 11:09:07 +0530
committerAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>2010-09-08 22:56:42 +0530
commit5c0f255dd4c8b8f3349b6ed14233f77948c5a9a6 (patch)
tree3ce96facb16ec9cb0453555568d1b6588211007e /hw/virtio-9p-local.c
parent12848bfc5d719bad536c5448205a3226be1fda47 (diff)
virtio-9p: Use lchown which won't follow symlink
We should always use functions which don't follow symlink on the server Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Diffstat (limited to 'hw/virtio-9p-local.c')
-rw-r--r--hw/virtio-9p-local.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/virtio-9p-local.c b/hw/virtio-9p-local.c
index 58e7647da5..132816e607 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