[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 05/29] 9pfs: local: keep a file descriptor on th
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [PATCH 05/29] 9pfs: local: keep a file descriptor on the shared folder |
Date: |
Thu, 23 Feb 2017 11:23:42 +0000 |
User-agent: |
Mutt/1.7.1 (2016-10-04) |
On Mon, Feb 20, 2017 at 03:39:59PM +0100, Greg Kurz wrote:
> This patch opens the shared folder and caches the file descriptor, so that
> it can be used to do symlink-safe path walk.
>
> Signed-off-by: Greg Kurz <address@hidden>
> ---
> hw/9pfs/9p-local.c | 30 ++++++++++++++++++++++++++++--
> 1 file changed, 28 insertions(+), 2 deletions(-)
>
> diff --git a/hw/9pfs/9p-local.c b/hw/9pfs/9p-local.c
> index c2239bfafce4..8aee7f2516ed 100644
> --- a/hw/9pfs/9p-local.c
> +++ b/hw/9pfs/9p-local.c
> @@ -14,6 +14,7 @@
> #include "qemu/osdep.h"
> #include "9p.h"
> #include "9p-xattr.h"
> +#include "9p-util.h"
> #include "fsdev/qemu-fsdev.h" /* local_ops */
> #include <arpa/inet.h>
> #include <pwd.h>
> @@ -43,6 +44,10 @@
> #define BTRFS_SUPER_MAGIC 0x9123683E
> #endif
>
> +struct local_data {
QEMU coding style would requires:
typedef struct {
int mountfd;
} LocalData;
Otherwise:
Reviewed-by: Stefan Hajnoczi <address@hidden>
signature.asc
Description: PGP signature
- [Qemu-devel] [PATCH 01/29] 9pfs: local: move xattr security ops to 9p-xattr.c, (continued)
- [Qemu-devel] [PATCH 01/29] 9pfs: local: move xattr security ops to 9p-xattr.c, Greg Kurz, 2017/02/20
- [Qemu-devel] [PATCH 02/29] 9pfs: remove side-effects in local_init(), Greg Kurz, 2017/02/20
- [Qemu-devel] [PATCH 03/29] 9pfs: remove side-effects in local_open() and local_opendir(), Greg Kurz, 2017/02/20
- [Qemu-devel] [PATCH 04/29] 9pfs: introduce openat_nofollow() helper, Greg Kurz, 2017/02/20
- [Qemu-devel] [PATCH 05/29] 9pfs: local: keep a file descriptor on the shared folder, Greg Kurz, 2017/02/20
- Re: [Qemu-devel] [PATCH 05/29] 9pfs: local: keep a file descriptor on the shared folder,
Stefan Hajnoczi <=
- [Qemu-devel] [PATCH 06/29] 9pfs: local: open/opendir: don't follow symlinks, Greg Kurz, 2017/02/20
- [Qemu-devel] [PATCH 07/29] 9pfs: local: introduce symlink-attack safe xattr helpers, Greg Kurz, 2017/02/20
- [Qemu-devel] [PATCH 08/29] 9pfs: local: lgetxattr: don't follow symlinks, Greg Kurz, 2017/02/20