Function report |
Source Code:security\keys\request_key_auth.c |
Create Date:2022-07-28 18:24:22 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:Create an authorisation token for /sbin/request-key or whoever to gain* access to the caller's security data.
Proto:struct key *request_key_auth_new(struct key *target, const char *op, const void *callout_info, size_t callout_len, struct key *dest_keyring)
Type:struct key
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct key * | target | |
| const char * | op | |
| const void * | callout_info | |
| size_t | callout_len | |
| struct key * | dest_keyring |
| 167 | cred = current_cred - Access the current task's subjective credentials* Access the subjective credentials of the current task. RCU-safe,* since nobody else can modify it.() |
| 172 | kenter("%d,", key serial number ) |
| 175 | rka = 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). |
| 179 | If Not callout_info Then Go to error_free_rka |
| 181 | callout_len = callout_len |
| 186 | If assumed request_key authority Then |
| 188 | lock for reading |
| 205 | Else |
| 211 | target_key = key_get(target) |
| 212 | dest_keyring = key_get(dest_keyring) |
| 215 | sprintf(desc, "%x", key serial number ) |
| 223 | Go to error_free_rka |
| 228 | If ret < 0 Then Go to error_put_authkey |
| 231 | kleave(" = {%d,%d}", key serial number , _read - get a refcount's value*@r: the refcount* Return: the refcount's value) |
| 232 | Return authkey |
| 234 | error_put_authkey : |
| 236 | error_free_rka : |
| 237 | free_request_key_auth(rka) |
| 238 | error : |
| Name | Describe |
|---|---|
| construct_key | Call out to userspace for key construction.* Program failure is ignored in favour of key status. |
| 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 |