| Function report | 
| Source Code: security\keys\keyctl.c | Create Date:2022-07-28 18:21:06 | 
| Last Modify:2020-03-18 07:59:52 | Copyright©Brick | 
| home page | Tree | 
| Annotation kernel can get tool activity | Download SCCT | Chinese | 
Name:Apply a restriction to a given keyring.* The caller must have Setattr permission to change keyring restrictions.* The requested type name may be a NULL pointer to reject all attempts* to link to the keyring. In this case, _restriction must also be NULL.
Proto:long keyctl_restrict_keyring(key_serial_t id, const char __user *_type, const char __user *_restriction)
Type:long
Parameter:
| Type | Parameter | Name | 
|---|---|---|
| key_serial_t | id | |
| const char __user * | _type | |
| const char __user * | _restriction | 
| 1658 | char * restriction = NULL | 
| 1666 | If _type Then | 
| 1667 | If Not _restriction Then Go to error | 
| 1670 | ret = key_get_type_from_user(type, _type, size of type ) | 
| 1675 | If IS_ERR(restriction) Then | 
| 1676 | ret = PTR_ERR(restriction) | 
| 1677 | Go to error | 
| 1679 | Else | 
| 1680 | If _restriction Then Go to error | 
| 1685 | kfree(restriction) | 
| 1686 | error : | 
| 1687 | key_ref_put(key_ref) | 
| 1688 | Return ret | 
| Name | Describe | 
|---|---|
| SYSCALL_DEFINE5 | The key control system call | 
| COMPAT_SYSCALL_DEFINE5 | The key control system call, 32-bit compatibility version for 64-bit archs | 
| 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 |