virtiofsd, fuse_lowlevel.c: Add capability to parse security context

Add capability to enable and parse security context as sent by client
and put into fuse_req. Filesystems now can get security context from
request and set it on files during creation.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Message-Id: <20220208204813.682906-6-vgoyal@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
This commit is contained in:
Vivek Goyal 2022-02-08 15:48:08 -05:00 committed by Dr. David Alan Gilbert
parent 4c7c393c7b
commit 36cfab870e
3 changed files with 113 additions and 1 deletions

View file

@ -15,6 +15,12 @@
struct fv_VuDev;
struct fv_QueueInfo;
struct fuse_security_context {
const char *name;
uint32_t ctxlen;
const void *ctx;
};
struct fuse_req {
struct fuse_session *se;
uint64_t unique;
@ -35,6 +41,7 @@ struct fuse_req {
} u;
struct fuse_req *next;
struct fuse_req *prev;
struct fuse_security_context secctx;
};
struct fuse_notify_req {