| Function report | 
| Source Code: security\keys\keyctl.c | Create Date:2022-07-28 18:20:03 | 
| Last Modify:2020-03-18 07:59:52 | Copyright©Brick | 
| home page | Tree | 
| Annotation kernel can get tool activity | Download SCCT | Chinese | 
Name:Search the specified keyring and any keyrings it links to for a matching* key
Proto:long keyctl_keyring_search(key_serial_t ringid, const char __user *_type, const char __user *_description, key_serial_t destringid)
Type:long
Parameter:
| Type | Parameter | Name | 
|---|---|---|
| key_serial_t | ringid | |
| const char __user * | _type | |
| const char __user * | _description | |
| key_serial_t | destringid | 
| 727 | ret = key_get_type_from_user(type, _type, size of type ) | 
| 732 | If IS_ERR(description) Then | 
| 733 | ret = PTR_ERR(description) | 
| 734 | Go to error | 
| 739 | If IS_ERR(keyring_ref) Then | 
| 740 | ret = PTR_ERR(keyring_ref) | 
| 741 | Go to error2 | 
| 745 | dest_ref = NULL | 
| 746 | If destringid Then | 
| 756 | ktype = Find and lock the specified key type against removal.* We return with the sem read-locked if successful. If the type wasn't* available -ENOKEY is returned instead. | 
| 763 | key_ref = keyring_search - Search the supplied keyring tree for a matching key*@keyring: The root of the keyring tree to be searched | 
| 774 | If dest_ref Then | 
| 784 | ret = key serial number | 
| 786 | error6 : | 
| 787 | key_ref_put(key_ref) | 
| 788 | error5 : | 
| 790 | error4 : | 
| 791 | key_ref_put(dest_ref) | 
| 792 | error3 : | 
| 793 | key_ref_put(keyring_ref) | 
| 794 | error2 : | 
| 795 | kfree(description) | 
| 796 | error : | 
| 797 | 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 |