mirror of
https://github.com/qemu/qemu.git
synced 2024-12-03 08:43:38 +08:00
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>
This commit is contained in:
parent
12848bfc5d
commit
5c0f255dd4
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user