qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v4 0/1] 9pfs: local: Add support for custom fmode/dmode in 9ps mapped security modes
@ 2017-06-19 14:28 Tobias Schramm
  2017-06-19 14:28 ` [Qemu-devel] [PATCH v4 1/1] " Tobias Schramm
  2017-06-19 19:15 ` [Qemu-devel] [PATCH v4 0/1] " Greg Kurz
  0 siblings, 2 replies; 4+ messages in thread
From: Tobias Schramm @ 2017-06-19 14:28 UTC (permalink / raw)
  To: qemu-devel; +Cc: aneesh.kumar, groug, el13635, Tobias Schramm

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".

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(-)

-- 
2.13.1

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-06-19 19:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-19 14:28 [Qemu-devel] [PATCH v4 0/1] 9pfs: local: Add support for custom fmode/dmode in 9ps mapped security modes Tobias Schramm
2017-06-19 14:28 ` [Qemu-devel] [PATCH v4 1/1] " Tobias Schramm
2017-06-19 19:20   ` Greg Kurz
2017-06-19 19:15 ` [Qemu-devel] [PATCH v4 0/1] " Greg Kurz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).