Function report | 
Source Code:security\selinux\netlabel.c | 
Create Date:2022-07-28 19:17:30 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| home page | Tree | 
| Annotation kernel can get tool activity | Download SCCT | Chinese | 
Name:selinux_netlbl_skbuff_setsid - Set the NetLabel on a packet given a sid*@skb: the packet*@family: protocol family*@sid: the SID* Description* Call the NetLabel mechanism to set the label of a packet using @sid.
Proto:int selinux_netlbl_skbuff_setsid(struct sk_buff *skb, u16 family, unsigned int sid)
Type:int
Parameter:
| Type | Parameter | Name | 
|---|---|---|
| struct sk_buff * | skb | |
| u16 | family | |
| unsigned int | sid | 
| 231 | struct netlbl_lsm_secattr * secattr = NULL | 
| 236 | sk = skb_to_full_sk(skb) | 
| 237 | If (sk != NULL) Then | 
| 238 | sksec = sk_security | 
| 240 | If nlbl_state != NLBL_REQSKB Then Return 0 | 
| 244 | If (secattr == NULL) Then | 
| 245 | secattr = secattr_storage | 
| 247 | rc = security_netlbl_sid_to_secattr( & selinux_state, sid, secattr) | 
| 249 | If rc != 0 Then Go to skbuff_setsid_return | 
| 253 | rc = netlbl_skbuff_setattr(skb, family, secattr) | 
| 255 | skbuff_setsid_return : | 
| 258 | 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  |