summaryrefslogtreecommitdiff
path: root/fsdev/file-op-9p.h
diff options
context:
space:
mode:
authorAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>2011-10-13 13:21:00 +0530
committerAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>2011-10-15 15:30:27 +0530
commitb97400caef60ccfb0bc81c59f8bd824c43a0d6c8 (patch)
tree22bf03bd2f95f8e01dc4312cd94c176cbc7ea0c3 /fsdev/file-op-9p.h
parentfbcbf101aa8c6f069f777960ee0b26a11fe3386f (diff)
downloadqemu-b97400caef60ccfb0bc81c59f8bd824c43a0d6c8.tar.gz
hw/9pfs: Use export flag for indicating security model
This helps to remove some of the structure members Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Diffstat (limited to 'fsdev/file-op-9p.h')
-rw-r--r--fsdev/file-op-9p.h36
1 files changed, 17 insertions, 19 deletions
diff --git a/fsdev/file-op-9p.h b/fsdev/file-op-9p.h
index 272f018efb..908e2a5edc 100644
--- a/fsdev/file-op-9p.h
+++ b/fsdev/file-op-9p.h
@@ -23,23 +23,6 @@
#define SM_LOCAL_MODE_BITS 0600
#define SM_LOCAL_DIR_MODE_BITS 0700
-typedef enum
-{
- /*
- * Server will try to set uid/gid.
- * On failure ignore the error.
- */
- SM_NONE = 0,
- /*
- * uid/gid set on fileserver files
- */
- SM_PASSTHROUGH = 1,
- /*
- * uid/gid part of xattr
- */
- SM_MAPPED,
-} SecModel;
-
typedef struct FsCred
{
uid_t fc_uid;
@@ -60,12 +43,27 @@ typedef struct extended_ops {
/* export flags */
#define V9FS_IMMEDIATE_WRITEOUT 0x00000001
#define V9FS_PATHNAME_FSCONTEXT 0x00000002
+/*
+ * uid/gid set on fileserver files
+ */
+#define V9FS_SM_PASSTHROUGH 0x00000004
+/*
+ * uid/gid part of xattr
+ */
+#define V9FS_SM_MAPPED 0x00000008
+/*
+ * Server will try to set uid/gid.
+ * On failure ignore the error.
+ */
+#define V9FS_SM_NONE 0x00000010
+
+
+#define V9FS_SEC_MASK 0x0000001C
typedef struct FsContext
{
- char *fs_root;
- SecModel fs_sm;
uid_t uid;
+ char *fs_root;
int export_flags;
struct xattr_operations **xops;
struct extended_ops exops;