qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2 2/4] 9pfs: local: resolve special directories


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH v2 2/4] 9pfs: local: resolve special directories in paths
Date: Tue, 23 May 2017 10:49:58 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0

On 05/23/2017 09:32 AM, Greg Kurz wrote:
> When using the mapped-file security mode, the creds of a path /foo/bar
> are stored in the /foo/.virtfs_metadata/bar file. This is okay for all
> paths unless they end with '.' or '..', because we cannot create the
> corresponding file in the metadata directory.
> 
> This patch ensures that '.' and '..' are resolved in all paths.
> 
> The core code only passes path elements (no '/') to the backend, with
> the notable exception of the '/' path, which refers to the virtfs root.
> This patch preserves the current behavior of converting it to '.' so
> that it can be passed to "*at()" syscalls ('/' would mean the host root).
> 
> Signed-off-by: Greg Kurz <address@hidden>
> ---
> +            } else {
> +                char *tmp = g_path_get_dirname(dir_path->data);
> +                /* Symbolic links are resolved by the client. We can assume
> +                 * that ".." relative to "foo/bar" is equivalent to "foo"
> +                 */

Thanks for tweaking this since v1.

Reviewed-by: Eric Blake <address@hidden>

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]