diff options
author | Tobias Schramm <tobleminer@gmail.com> | 2017-06-29 15:11:50 +0200 |
---|---|---|
committer | Greg Kurz <groug@kaod.org> | 2017-06-29 15:11:50 +0200 |
commit | b96feb2cb9b2714bffa342b1d4f39d8db71329ba (patch) | |
tree | e7a81567660c5cf379f78f532e288ef2d3174838 /fsdev/file-op-9p.h | |
parent | 790db7efdbe1536acf1c4f4f95a0316dbda59433 (diff) |
9pfs: local: Add support for custom fmode/dmode in 9ps mapped security modes
In mapped security modes, files are created with very restrictive
permissions (600 for files and 700 for directories). This makes
file sharing between virtual machines and users on the host rather
complicated. Imagine eg. a group of users that need to access data
produced by processes on a virtual machine. Giving those users access
to the data will be difficult since the group access mode is always 0.
This patch makes the default mode for both files and directories
configurable. Existing setups that don't know about the new parameters
keep using the current secure behavior.
Signed-off-by: Tobias Schramm <tobleminer@gmail.com>
Signed-off-by: Greg Kurz <groug@kaod.org>
Diffstat (limited to 'fsdev/file-op-9p.h')
-rw-r--r-- | fsdev/file-op-9p.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fsdev/file-op-9p.h b/fsdev/file-op-9p.h index 0844a403dc..474c79d003 100644 --- a/fsdev/file-op-9p.h +++ b/fsdev/file-op-9p.h @@ -76,6 +76,8 @@ typedef struct FsDriverEntry { int export_flags; FileOperations *ops; FsThrottle fst; + mode_t fmode; + mode_t dmode; } FsDriverEntry; typedef struct FsContext @@ -88,6 +90,8 @@ typedef struct FsContext FsThrottle *fst; /* fs driver specific data */ void *private; + mode_t fmode; + mode_t dmode; } FsContext; typedef struct V9fsPath { |