On Mon, 19 Jun 2017 16:28:47 +0200
Tobias Schramm <tobleminer@gmail.com> wrote:
> Hi,
>
> i've noticed that there is no way to control the permissions of newly created files and
> folders on the host when using 9p in mapped security mode. This can be a big problem when
> configuring permissions for access to such data for groups and via ACLs on the host.
> Thus I added the options fmode and dmode to the fsdev and virtfs options that set the actual
> permissions of newly created files and folders on the host.
>
> This version of the patch fixes the back to front "mask" naming in the previous patches. I
> always meant "mode" when actually writing "mask".
>
Indeed, this hasn't the umask semantics.
> Also specifying fmode and dmode only has an effect in mapped security modes. Specifying it
> in any other mode now throws an error.
>
> Additionally I've switched fmode and dmode to QEMU_OPT_NUMBER because it handels octal input
> just fine.
>
> Also previous versions leaked a string with g_strdup if an error during parsing of fmode/dmode
> occurred.
>
> Thanks to Greg Kurz for pointing out most of the above issues to me.
>
> Tobias Schramm
>
> Tobias Schramm (1):
> Add support for custom fmode/dmode in 9ps mapped security modes
>
> fsdev/file-op-9p.h | 4 ++++
> fsdev/qemu-fsdev-opts.c | 12 ++++++++++++
> hw/9pfs/9p-local.c | 34 +++++++++++++++++++++++++---------
> hw/9pfs/9p.c | 3 +++
> qemu-options.hx | 20 ++++++++++++++++----
> 5 files changed, 60 insertions(+), 13 deletions(-)
>