mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-23 15:11:16 +00:00
security: new security_inode_init_security API adds function callback
This patch changes the security_inode_init_security API by adding a filesystem specific callback to write security extended attributes. This change is in preparation for supporting the initialization of multiple LSM xattrs and the EVM xattr. Initially the callback function walks an array of xattrs, writing each xattr separately, but could be optimized to write multiple xattrs at once. For existing security_inode_init_security() calls, which have not yet been converted to use the new callback function, such as those in reiserfs and ocfs2, this patch defines security_old_inode_init_security(). Signed-off-by: Mimi Zohar <zohar@us.ibm.com>
This commit is contained in:
parent
0f2a55d5bb
commit
9d8f13ba3f
14 changed files with 255 additions and 188 deletions
|
@ -67,6 +67,12 @@ struct xattr_handler {
|
|||
size_t size, int flags, int handler_flags);
|
||||
};
|
||||
|
||||
struct xattr {
|
||||
char *name;
|
||||
void *value;
|
||||
size_t value_len;
|
||||
};
|
||||
|
||||
ssize_t xattr_getsecurity(struct inode *, const char *, void *, size_t);
|
||||
ssize_t vfs_getxattr(struct dentry *, const char *, void *, size_t);
|
||||
ssize_t vfs_listxattr(struct dentry *d, char *list, size_t size);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue