forked from torvalds/linux
Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
fuse: Send security context of inode on file creation
When a new inode is created, send its security context to server along with creation request (FUSE_CREAT, FUSE_MKNOD, FUSE_MKDIR and FUSE_SYMLINK). This gives server an opportunity to create new file and set security context (possibly atomically). In all the configurations it might not be possible to set context atomically. Like nfs and ceph, use security_dentry_init_security() to dermine security context of inode and send it with create, mkdir, mknod, and symlink requests. Following is the information sent to server. - struct fuse_secctxs. This contains total number of security contexts being sent. - struct fuse_secctx. This contains total size of security context which follows this structure. There is one fuse_secctx instance per security context. - xattr name string. This string represents name of xattr which should be used while setting security context. As of now it is hardcoded to "security.selinux". - security context. This is the actual security context whose size is specified in fuse_secctx struct. This patch is modified version of patch from Chirantan Ekbote <chirantan@chromium.org> v2: - Added "fuse_secctxs" structure where one can specify how many security contexts are being sent. This can be useful down the line if we have more than one security contexts being set. Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
- Loading branch information
1 parent
450a57a
commit 3671f69d52ea6521c521ba6052be8e1b07e19ef7
Showing
4 changed files
with
136 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters