mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-09 02:24:58 -06:00
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>
This commit is contained in:
parent
0f8151cb75
commit
fc22118d9b
7 changed files with 345 additions and 92 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue