Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\cred.c Create Date:2022-07-28 09:32:30
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Copy a certificate

Proto:int copy_creds(struct task_struct *p, unsigned long clone_flags)

Type:int

Parameter:

TypeParameterName
struct task_struct *p
unsigned longclone_flags
339  If Not keyring private to this thread && clone_flags & Same thread group Then
345  Objective and real subjective task credentials (COW): = get_cred - Get a reference on a set of credentials*@cred: The credentials to reference* Get a reference on the specified set of credentials. The caller must* release the reference. If %NULL is passed, it is returned with no action.
346  get_cred - Get a reference on a set of credentials*@cred: The credentials to reference* Get a reference on the specified set of credentials. The caller must* release the reference. If %NULL is passed, it is returned with no action.
347  alter_cred_subscribers( Effective (overridable) subjective task credentials (COW): , 2)
348  kdebug("share_creds(%p{%d,%d})", Effective (overridable) subjective task credentials (COW): , atomic_read( & usage), read_cred_subscribers( Effective (overridable) subjective task credentials (COW): ))
351  atomic_inc( & How many processes does this user have? )
352  Return 0
355  new = prepare_creds - Prepare a new set of credentials for modification* Prepare a new set of task credentials for modification
356  If Not new Then Return -ENOMEM
359  If clone_flags & New user namespace Then
360  ret = Create a new user namespace, deriving the creator from the user in the* passed credentials, and replacing that user with the new root user for the* new namespace.* This is called by copy_creds(), which will finish setting the target task's* credentials.
361  If ret < 0 Then Go to error_put
368  If keyring private to this thread Then
369  key_put( keyring private to this thread )
370  keyring private to this thread = NULL
371  If clone_flags & Same thread group Then he userspace interface
378  If Not (clone_flags & Same thread group) Then
379  key_put( keyring private to this process )
380  keyring private to this process = NULL
384  atomic_inc( & How many processes does this user have? )
385  Effective (overridable) subjective task credentials (COW): = Objective and real subjective task credentials (COW): = get_cred - Get a reference on a set of credentials*@cred: The credentials to reference* Get a reference on the specified set of credentials. The caller must* release the reference. If %NULL is passed, it is returned with no action.
386  alter_cred_subscribers(new, 2)
387  validate_creds(new)
388  Return 0
390  error_put :
391  put_cred - Release a reference to a set of credentials*@cred: The credentials to release* Release a reference to a set of credentials, deleting them when the last ref* is released
392  Return ret