Function report |
Source Code:fs\crypto\keyring.c |
Create Date:2022-07-28 20:23:55 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:Try to remove an fscrypt master encryption key
Proto:static int do_remove_key(struct file *filp, void __user *_uarg, bool all_users)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
struct file * | filp | |
void __user * | _uarg | |
bool | all_users |
766 | status_flags = 0 |
770 | If copy_from_user( & arg, uarg, size of arg ) Then Return -EFAULT |
773 | If Not valid_key_spec( & key_spec) Then Return -EINVAL |
793 | lock for writing |
797 | If all_users Then err = keyring_clear(Keyring which contains a key of type 'key_type_fscrypt_user' for each* user who has added this key) |
799 | Else err = Remove the current user's "key" from ->mk_users.* The master key's key->sem must be held for write.* Returns 0 if removed, -ENOKEY if not found, or another -errno code. |
801 | If err Then |
803 | Go to out_put_key |
805 | If nr_leaves_on_tree != 0 Then |
813 | err = 0 |
815 | Go to out_put_key |
820 | dead = false |
822 | lock for writing |
828 | If dead Then |
833 | key_invalidate(key) |
834 | err = 0 |
835 | Else |
837 | err = try_to_lock_encrypted_files(sb, mk) |
841 | err = 0 |
850 | out_put_key : |
852 | If err == 0 Then err = Write a simple value into user space(status_flags, & utput ) |
854 | Return err |
Name | Describe |
---|---|
fscrypt_ioctl_remove_key | |
fscrypt_ioctl_remove_key_all_users |
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 |