Function report |
Source Code:security\keys\request_key.c |
Create Date:2022-07-28 18:23:36 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:Allocate a new key in under-construction state and attempt to link it in to* the requested keyring.* May return a key that's already under construction instead if there was a* race between two thread calling request_key().
Proto:static int construct_alloc_key(struct keyring_search_context *ctx, struct key *dest_keyring, unsigned long flags, struct key_user *user, struct key **_key)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
struct keyring_search_context * | ctx | |
struct key * | dest_keyring | |
unsigned long | flags | |
struct key_user * | user | |
struct key ** | _key |
372 | struct assoc_array_edit * edit = NULL |
378 | kenter("%s,%s,,,", name, description) |
381 | * _key = NULL |
382 | mutex_lock( & construction initiation lock ) |
384 | perm = possessor can view a key's attributes | possessor can find a key in search / search a keyring | possessor can create a link to a key/keyring | possessor can set key attributes |
385 | perm |= user permissions... |
386 | If read Then perm |= possessor can read key payload / view keyring |
388 | If type == key_type_keyring || update Then perm |= possessor can update key payload / add link to keyring |
395 | If IS_ERR(key) Then Go to alloc_failed |
400 | If dest_keyring Then |
401 | ret = Lock keyring for link. |
402 | If ret < 0 Then Go to link_lock_failed |
405 | If ret < 0 Then Go to link_prealloc_failed |
417 | If Not IS_ERR(key_ref) Then Go to key_already_present |
424 | If dest_keyring Then Finish linking a key into to a keyring.* Must be called with __key_link_begin() having being called. |
428 | kleave(" = 0 [%d]", key_serial(key)) |
429 | Return 0 |
433 | key_already_present : |
436 | key = key_ref_to_ptr(key_ref) |
437 | If dest_keyring Then |
441 | Finish linking a key into to a keyring.* Must be called with __key_link_begin() having being called. |
442 | If ret < 0 Then Go to link_check_failed |
447 | kleave(" = -EINPROGRESS [%d]", key_serial(key)) |
448 | Return -EINPROGRESS |
450 | link_check_failed : |
454 | Return ret |
456 | link_prealloc_failed : |
457 | Finish linking a key into to a keyring.* Must be called with __key_link_begin() having being called. |
458 | link_lock_failed : |
462 | Return ret |
464 | alloc_failed : |
Name | Describe |
---|---|
construct_key_and_link | Commence key construction. |
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 |