Function report |
Source Code:security\smack\smack_lsm.c |
Create Date:2022-07-28 19:24:17 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name: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
Proto:static int smack_inet_conn_request(struct sock *sk, struct sk_buff *skb, struct request_sock *req)
Type:int
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct sock * | sk | |
| struct sk_buff * | skb | |
| struct request_sock * | req |
| 4086 | ssp = sk_security |
| 4104 | If protocol == htons(Internet Protocol packet ) Then family = PF_INET |
| 4106 | Else Return 0 |
| 4118 | skp = smack_from_secid(secmark) |
| 4119 | Go to access_check |
| 4124 | rc = netlbl_skbuff_getattr(skb, family, & secattr) |
| 4127 | Else skp = smack_known_huh |
| 4132 | access_check : |
| 4136 | smk_ad_init_net( & ad, __func__, LSM_AUDIT_DATA_NET, & net) |
| 4145 | rc = smk_access(skp, inbound label , MAY_WRITE, & ad) |
| 4146 | rc = smk_bu_note("IPv4 connect", skp, inbound label , MAY_WRITE, rc) |
| 4154 | peer_secid = smk_secid |
| 4167 | If (hskp == NULL) Then rc = netlbl_req_setattr(req, & wire labels ) |
| 4169 | Else netlbl_req_delattr(req) |
| 4172 | Return rc |
| 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 |