Function report | 
Source Code:kernel\cred.c | 
Create Date:2022-07-28 09:32:40 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| home page | Tree | 
| Annotation kernel can get tool activity | Download SCCT | Chinese | 
Name:prepare_kernel_cred - Prepare a set of credentials for a kernel service*@daemon: A userspace daemon to be used as a reference* Prepare a set of credentials for a kernel service
Proto:struct cred *prepare_kernel_cred(struct task_struct *daemon)
Type:struct cred
Parameter:
| Type | Parameter | Name | 
|---|---|---|
| struct task_struct * | daemon | 
| 686 | new = kmem_cache_alloc(cred_jar, GFP_KERNEL) | 
| 687 | If Not new Then Return NULL | 
| 692 | If daemon Then old = get_task_cred - Get another task's objective credentials*@task: The task to query* Get the objective credentials of a task, pinning them so that they can't go* away | 
| 697 | validate_creds(old) | 
| 700 | Can we skip RCU deletion? = 0 | 
| 701 | atomic_set( & usage, 1) | 
| 702 | set_cred_subscribers(new, 0) | 
| 703 | get_uid( real user ID subscription ) | 
| 708 | keyring inherited over fork = NULL | 
| 709 | keyring private to this process = NULL | 
| 710 | keyring private to this thread = NULL | 
| 711 | assumed request_key authority = NULL | 
| 716 | subjective LSM security = NULL | 
| 718 | If security_prepare_creds(new, old, GFP_KERNEL_ACCOUNT) < 0 Then Go to error | 
| 722 | validate_creds(new) | 
| 723 | Return new | 
| 725 | error : | 
| 728 | Return NULL | 
| 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  |