| Function report | 
| Source Code: security\smack\smack_lsm.c | Create Date:2022-07-28 19:23:43 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| home page | Tree | 
| Annotation kernel can get tool activity | Download SCCT | Chinese | 
Name:smack_from_secattr - Convert a netlabel attr.mls.lvl/attr.mls.cat pair to smack*@sap: netlabel secattr*@ssp: socket security information* Returns a pointer to a Smack label entry found on the label list.
Proto:static struct smack_known *smack_from_secattr(struct netlbl_lsm_secattr *sap, struct socket_smack *ssp)
Type:struct smack_known
Parameter:
| Type | Parameter | Name | 
|---|---|---|
| struct netlbl_lsm_secattr * | sap | |
| struct socket_smack * | ssp | 
| 3720 | found = 0 | 
| 3724 | If (flags & NETLBL_SECATTR_MLS_LVL) != 0 Then | 
| 3742 | If (flags & NETLBL_SECATTR_MLS_CAT) == 0 Then | 
| 3743 | If (flags & NETLBL_SECATTR_MLS_CAT) == 0 Then found = 1 | 
| 3746 | Break | 
| 3758 | found = 1 | 
| 3759 | Break | 
| 3767 | If ssp != NULL && inbound label == smack_known_star Then Return smack_known_web | 
| 3769 | Return smack_known_star | 
| 3771 | If (flags & NETLBL_SECATTR_SECID) != 0 Then Return smack_from_secid(secid) | 
| 3781 | Return smack_net_ambient | 
| Name | Describe | 
|---|---|
| smack_socket_sock_rcv_skb | smack_socket_sock_rcv_skb - Smack packet delivery access check*@sk: socket*@skb: packet* Returns 0 if the packet should be delivered, an error code otherwise | 
| smack_socket_getpeersec_dgram | smack_socket_getpeersec_dgram - pull in packet label*@sock: the peer socket*@skb: packet data*@secid: pointer to where to put the secid of the packet* Sets the netlabel socket state on sk from parent | 
| smack_inet_conn_request | smack_inet_conn_request - Smack access check on connect*@sk: socket involved*@skb: packet*@req: unused* Returns 0 if a task with the packet label could write to* the socket, otherwise an error code | 
| 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 |