Function report |
Source Code:security\smack\smack_lsm.c |
Create Date:2022-07-28 19:24:24 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:smack_key_permission - Smack access on a key*@key_ref: gets to the object*@cred: the credentials to use*@perm: requested key permissions* Return 0 if the task has read and write to the object,* an error code otherwise
Proto:static int smack_key_permission(key_ref_t key_ref, const struct cred *cred, unsigned perm)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
key_ref_t | key_ref | |
const struct cred * | cred | |
unsigned | perm |
4249 | request = 0 |
4255 | If perm & ~All the above permissions Then Return -EINVAL |
4258 | keyp = key_ref_to_ptr(key_ref) |
4265 | If ( security data for this key == NULL) Then Return 0 |
4278 | key = key serial number |
4279 | key_desc = description |
4281 | If perm & ( Require permission to read content | Require permission to search (keyring) or find (key) | Require permission to view attributes ) Then request |= MAY_READ |
4283 | If perm & ( Require permission to update / modify | Require permission to link | Require permission to change attributes ) Then request |= MAY_WRITE |
4285 | rc = smk_access(tkp, security data for this key , request, & ad) |
4286 | rc = smk_bu_note("key access", tkp, security data for this key , request, rc) |
4287 | Return rc |
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 |