Function report |
Source Code:security\smack\smack_lsm.c |
Create Date:2022-07-28 19:22:24 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:smk_ipv6_port_label - Smack port access table management*@sock: socket*@address: address* Create or update the port list entry
Proto:static void smk_ipv6_port_label(struct socket *sock, struct sockaddr *address)
Type:void
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct socket * | sock | |
| struct sockaddr * | address |
| 2532 | ssp = sk_security |
| 2534 | port = 0 |
| 2536 | If (address == NULL) Then |
| 2544 | If sk != socket initialized on Then Continue |
| 2546 | bound label = inbound label |
| 2547 | utgoing label = outbound label |
| 2549 | Return |
| 2556 | Return |
| 2560 | port = ntohs( Transport layer port # ) |
| 2564 | If port == 0 Then Return |
| 2573 | If he port number != port || Socket type != type Then Continue |
| 2575 | If smk_can_reuse != 1 Then |
| 2579 | he port number = port |
| 2580 | socket initialized on = sk |
| 2581 | bound label = inbound label |
| 2582 | utgoing label = outbound label |
| 2583 | smk_can_reuse = 0 |
| 2585 | Return |
| 2591 | spp = 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). |
| 2592 | If (spp == NULL) Then Return |
| 2595 | he port number = port |
| 2596 | socket initialized on = sk |
| 2597 | bound label = inbound label |
| 2598 | utgoing label = outbound label |
| 2599 | Socket type = type |
| 2600 | smk_can_reuse = 0 |
| 2602 | mutex_lock( & smack_ipv6_lock) |
| 2605 | Return |
| Name | Describe |
|---|---|
| smack_inode_setsecurity | smack_inode_setsecurity - set smack xattrs*@inode: the object*@name: attribute name*@value: attribute value*@size: size of the attribute*@flags: unused* Sets the named attribute in the appropriate blob* Returns 0 on success, or an error code |
| smack_socket_bind | smack_socket_bind - record port binding information.*@sock: the socket*@address: the port address*@addrlen: size of the address* Records the label bound to a port.* Returns 0 on success, and error code otherwise |
| 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 |