| Function report | 
| Source Code: security\smack\smack_lsm.c | Create Date:2022-07-28 19:22:35 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| home page | Tree | 
| Annotation kernel can get tool activity | Download SCCT | Chinese | 
Name:smack_inode_setsecurity - set smack xattrs*@inode: the object*@name: attribute name*@value: attribute value*@size: size of the attribute*@flags: unused* Sets the named attribute in the appropriate blob* Returns 0 on success, or an error code
Proto:static int smack_inode_setsecurity(struct inode *inode, const char *name, const void *value, size_t size, int flags)
Type:int
Parameter:
| Type | Parameter | Name | 
|---|---|---|
| struct inode * | inode | |
| const char * | name | |
| const void * | value | |
| size_t | size | |
| int | flags | 
| 2687 | nsp = smack_inode(inode) | 
| 2690 | rc = 0 | 
| 2695 | skp = smk_import_entry(value, size) | 
| 2699 | If strcmp(name, XATTR_SMACK_SUFFIX) == 0 Then | 
| 2707 | If s_magic != SOCKFS_MAGIC Then Return -EOPNOTSUPP | 
| 2711 | If (sock == NULL || sk == NULL) Then Return -EOPNOTSUPP | 
| 2714 | ssp = sk_security | 
| 2716 | If strcmp(name, XATTR_SMACK_IPIN) == 0 Then inbound label = skp | 
| 2718 | Else if strcmp(name, XATTR_SMACK_IPOUT) == 0 Then | 
| 2719 | outbound label = skp | 
| 2727 | Else Return -EOPNOTSUPP | 
| 2731 | If sk_family == PF_INET6 Then smk_ipv6_port_label - Smack port access table management*@sock: socket*@address: address* Create or update the port list entry | 
| 2735 | Return 0 | 
| Name | Describe | 
|---|---|
| smack_inode_notifysecctx | There used to be a smack_release_secctx hook* that did nothing back when hooks were in a vector.* Now that there's a list such a hook adds cost. | 
| Source code conversion tool public plug-in interface | X | 
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |