| Function report | 
| Source Code: security\smack\smack_lsm.c | Create Date:2022-07-28 19:22:10 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| home page | Tree | 
| Annotation kernel can get tool activity | Download SCCT | Chinese | 
Name:smack_netlabel - Set the secattr on a socket*@sk: the socket*@labeled: socket label scheme* Convert the outbound smack value (smk_out) to a* secattr and attach it to the socket.* Returns 0 on success or an error code
Proto:static int smack_netlabel(struct sock *sk, int labeled)
Type:int
Parameter:
| Type | Parameter | Name | 
|---|---|---|
| struct sock * | sk | |
| int | labeled | 
| 2411 | ssp = sk_security | 
| 2412 | rc = 0 | 
| 2422 | local_bh_disable() | 
| 2423 | bh_lock_sock_nested(sk) | 
| 2428 | Else | 
| 2429 | skp = outbound label | 
| 2430 | rc = netlbl_sock_setattr(sk, sk_family, & wire labels ) | 
| 2433 | bh_unlock_sock(sk) | 
| 2434 | local_bh_enable() | 
| 2436 | Return rc | 
| Name | Describe | 
|---|---|
| smack_netlabel_send | smack_netlbel_send - Set the secattr on a socket and perform access checks*@sk: the socket*@sap: the destination address* Set the correct secattr for the given socket based on the destination* address and perform any outbound access checks needed. | 
| smack_inode_setsecurity | 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 | 
| smack_socket_post_create | smack_socket_post_create - finish socket setup*@sock: the socket*@family: protocol family*@type: unused*@protocol: unused*@kern: unused* Sets the netlabel information on the socket* Returns 0 on success, and error code otherwise | 
| 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 |