Function report |
Source Code:security\smack\smack_lsm.c |
Create Date:2022-07-28 19:23:31 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:smack_unix_stream_connect - Smack access on UDS*@sock: one sock*@other: the other sock*@newsk: unused* Return 0 if a subject with the smack of sock could access* an object with the smack of other, otherwise an error code
Proto:static int smack_unix_stream_connect(struct sock *sock, struct sock *other, struct sock *newsk)
Type:int
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct sock * | sock | |
| struct sock * | other | |
| struct sock * | newsk |
| 3585 | ssp = sk_security |
| 3586 | osp = sk_security |
| 3587 | nsp = sk_security |
| 3589 | rc = 0 |
| 3594 | If Not smack_privileged( Override MAC access) Then |
| 3595 | skp = outbound label |
| 3596 | okp = inbound label |
| 3598 | smk_ad_init_net( & ad, __func__, LSM_AUDIT_DATA_NET, & net) |
| 3599 | smk_ad_setfield_u_net_sk( & ad, other) |
| 3603 | If rc == 0 Then |
| 3604 | okp = outbound label |
| 3605 | skp = inbound label |
| 3615 | If rc == 0 Then |
| 3616 | TCP peer label = outbound label |
| 3617 | TCP peer label = outbound label |
| 3620 | 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 |