summaryrefslogtreecommitdiffstats
path: root/hw/file-op-9p.h
diff options
context:
space:
mode:
authorAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>2010-10-18 15:28:16 +0530
committerAnthony Liguori <aliguori@us.ibm.com>2010-10-20 12:10:58 -0500
commitfc22118d9bb56ec71655b936a29513c140e6c289 (patch)
tree0ca3caea259961bb1a3048bd3794f77f5edf74d5 /hw/file-op-9p.h
parent0f8151cb75e09c9a7de24a37f22166e46a9eaf7b (diff)
downloadhqemu-fc22118d9bb56ec71655b936a29513c140e6c289.zip
hqemu-fc22118d9bb56ec71655b936a29513c140e6c289.tar.gz
virtio-9p: Use layered xattr approach
We would need this to make sure we handle the mapped security model correctly for different xattr names. Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
Diffstat (limited to 'hw/file-op-9p.h')
-rw-r--r--hw/file-op-9p.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/hw/file-op-9p.h b/hw/file-op-9p.h
index d91b7e7..bf867b9 100644
--- a/hw/file-op-9p.h
+++ b/hw/file-op-9p.h
@@ -47,11 +47,14 @@ typedef struct FsCred
dev_t fc_rdev;
} FsCred;
+struct xattr_operations;
+
typedef struct FsContext
{
char *fs_root;
SecModel fs_sm;
uid_t uid;
+ struct xattr_operations **xops;
} FsContext;
extern void cred_init(FsCred *);
@@ -94,4 +97,12 @@ typedef struct FileOperations
int (*lremovexattr)(FsContext *, const char *, const char *);
void *opaque;
} FileOperations;
+
+static inline const char *rpath(FsContext *ctx, const char *path)
+{
+ /* FIXME: so wrong... */
+ static char buffer[4096];
+ snprintf(buffer, sizeof(buffer), "%s/%s", ctx->fs_root, path);
+ return buffer;
+}
#endif
OpenPOWER on IntegriCloud