Function report | 
Source Code:security\integrity\ima\ima_fs.c | 
Create Date:2022-07-28 19:57:48 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| home page | Tree | 
| Annotation kernel can get tool activity | Download SCCT | Chinese | 
Name:ima_write_policy
Proto:static ssize_t ima_write_policy(struct file *file, const char __user *buf, size_t datalen, loff_t *ppos)
Type:ssize_t
Parameter:
| Type | Parameter | Name | 
|---|---|---|
| struct file * | file | |
| const char __user * | buf | |
| size_t | datalen | |
| loff_t * | ppos | 
| 326 | data = memdup_user_nul - duplicate memory region from user space and NUL-terminate*@src: source address in user space*@len: number of bytes to copy* Return: an ERR_PTR() on failure. | 
| 332 | result = mutex_lock_interruptible( & ima_write_mutex) | 
| 336 | If data[0] == '/' Then | 
| 337 | result = ima_read_policy(data) | 
| 338 | Else if ima_appraise & IMA_APPRAISE_POLICY Then | 
| 339 | pr_err("signed policy file (specified as an absolute pathname) required\n") | 
| 340 | integrity_audit_msg(Integrity enable status , NULL, NULL, "policy_update", "signed policy required", 1, 0) | 
| 343 | If ima_appraise & Appraise integrity measurements Then result = -EACCES | 
| 345 | Else | 
| 349 | out_free : | 
| 351 | out : | 
| 352 | If result < 0 Then valid_policy = 0 | 
| 355 | Return result | 
| 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  |