mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
NFS: Client implementation of Labeled-NFS
This patch implements the client transport and handling support for labeled NFS. The patch adds two functions to encode and decode the security label recommended attribute which makes use of the LSM hooks added earlier. It also adds code to grab the label from the file attribute structures and encode the label to be sent back to the server. Acked-by: James Morris <[email protected]> Signed-off-by: Matthew N. Dodd <[email protected]> Signed-off-by: Miguel Rodel Felipe <[email protected]> Signed-off-by: Phua Eu Gene <[email protected]> Signed-off-by: Khin Mi Mi Aung <[email protected]> Signed-off-by: Steve Dickson <[email protected]> Signed-off-by: Trond Myklebust <[email protected]>
This commit is contained in:
parent
14c43f7678
commit
aa9c266962
8 changed files with 489 additions and 54 deletions
|
|
@ -2908,7 +2908,10 @@ static void selinux_inode_post_setxattr(struct dentry *dentry, const char *name,
|
|||
return;
|
||||
}
|
||||
|
||||
isec->sclass = inode_mode_to_security_class(inode->i_mode);
|
||||
isec->sid = newsid;
|
||||
isec->initialized = 1;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -2996,6 +2999,7 @@ static int selinux_inode_setsecurity(struct inode *inode, const char *name,
|
|||
if (rc)
|
||||
return rc;
|
||||
|
||||
isec->sclass = inode_mode_to_security_class(inode->i_mode);
|
||||
isec->sid = newsid;
|
||||
isec->initialized = 1;
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Reference in a new issue