Function report |
Source Code:security\selinux\netif.c |
Create Date:2022-07-28 19:09:06 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:sel_netif_sid_slow - Lookup the SID of a network interface using the policy*@ns: the network namespace*@ifindex: the network interface*@sid: interface SID* Description:* This function determines the SID of a network interface by quering the
Proto:static int sel_netif_sid_slow(struct net *ns, int ifindex, unsigned int *sid)
Type:int
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct net * | ns | |
| int | ifindex | |
| unsigned int * | sid |
| 135 | ret = 0 |
| 144 | If Value for the false possibility is greater at compile time(dev == NULL) Then |
| 147 | Return -ENOENT |
| 150 | spin_lock_bh( & sel_netif_lock) |
| 152 | If (netif != NULL) Then |
| 153 | sid = SID for this interface |
| 154 | Go to out |
| 157 | ret = security_netif_sid( & selinux_state, name, sid) |
| 160 | new = kzalloc - allocate memory. The memory is set to zero.*@size: how many bytes of memory are required.*@flags: the type of memory to allocate (see kmalloc). |
| 161 | If new Then |
| 169 | out : |
| 170 | spin_unlock_bh( & sel_netif_lock) |
| 172 | If Value for the false possibility is greater at compile time(ret) Then pr_warn("SELinux: failure in %s(), unable to determine network interface label (%d)\n", __func__, ifindex) |
| 175 | Return ret |
| Name | Describe |
|---|---|
| sel_netif_sid | sel_netif_sid - Lookup the SID of a network interface*@ns: the network namespace*@ifindex: the network interface*@sid: interface SID* Description:* This function determines the SID of a network interface using the fastest* method possible |
| 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 |