Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:mmit_creds - Install new credentials upon the current task*@new: The credentials to be assigned* Install a new set of credentials to the current task, using RCU to replace* the old set. Both the objective and the subjective credentials pointers are

Proto:int commit_creds(struct cred *new)

Type:int

Parameter:

TypeParameterName
struct cred *new
436  task = current process
437  old = Objective and real subjective task credentials (COW):
439  kdebug("commit_creds(%p{%d,%d})", new, atomic_read( & usage), read_cred_subscribers(new))
443  BUG_ON( Effective (overridable) subjective task credentials (COW): != old)
449  BUG_ON(atomic_read( & usage) < 1)
451  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.
454  If Not uid_eq( effective UID of the task , effective UID of the task ) || Not gid_eq( effective GID of the task , effective GID of the task ) || Not uid_eq( UID for VFS ops , UID for VFS ops ) || Not gid_eq( GID for VFS ops , GID for VFS ops ) || Not cred_cap_issubset(old, new) Then
459  If mm Then set_dumpable(mm, External variables not in a header file. )
461  The signal sent when the parent dies = 0
471  smp_wmb()
475  If Not uid_eq( UID for VFS ops , UID for VFS ops ) Then key_fsuid_changed(new)
477  If Not gid_eq( GID for VFS ops , GID for VFS ops ) Then key_fsgid_changed(new)
484  alter_cred_subscribers(new, 2)
485  If real user ID subscription != real user ID subscription Then atomic_inc( & How many processes does this user have? )
487  cu_assign_pointer() - assign to RCU-protected pointer*@p: pointer to assign to*@v: value to assign (publish)* Assigns the specified value to the specified RCU-protected* pointer, ensuring that any concurrent RCU readers will see* any prior initialization( Objective and real subjective task credentials (COW): , new)
488  cu_assign_pointer() - assign to RCU-protected pointer*@p: pointer to assign to*@v: value to assign (publish)* Assigns the specified value to the specified RCU-protected* pointer, ensuring that any concurrent RCU readers will see* any prior initialization( Effective (overridable) subjective task credentials (COW): , new)
489  If real user ID subscription != real user ID subscription Then atomic_dec( & How many processes does this user have? )
491  alter_cred_subscribers(old, - 2)
494  If Not uid_eq( real UID of the task , real UID of the task ) || Not uid_eq( effective UID of the task , effective UID of the task ) || Not uid_eq( saved UID of the task , saved UID of the task ) || Not uid_eq( UID for VFS ops , UID for VFS ops ) Then proc_id_connector(task, PROC_EVENT_UID)
500  If Not gid_eq( real GID of the task , real GID of the task ) || Not gid_eq( effective GID of the task , effective GID of the task ) || Not gid_eq( saved GID of the task , saved GID of the task ) || Not gid_eq( GID for VFS ops , GID for VFS ops ) Then proc_id_connector(task, PROC_EVENT_GID)
507  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
508  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
509  Return 0
Caller
NameDescribe
call_usermodehelper_exec_asyncThis is the task which runs the usermode application
set_current_groupsset_current_groups - Change current's group subscription*@group_info: The group list to impose* Validate a group subscription and, if valid, impose it upon current's task* security record.
userns_install
keyctl_set_reqkey_keyringRead or set the default keyring in which request_key() will cache keys and* return the old setting.* If a thread or process keyring is specified then it will be created if it* doesn't yet exist. The old setting will be returned if successful.
install_thread_keyringInstall a thread keyring to the current task if it didn't have one already.* Return: 0 if a thread keyring is now present; -errno on failure.
install_process_keyringInstall a process keyring to the current task if it didn't have one already.* Return: 0 if a process keyring is now present; -errno on failure.
install_session_keyringInstall the given keyring as the session keyring of the current task,* replacing the existing one if any. If the given keyring is NULL, then* install a new anonymous session keyring.* Return: 0 on success; -errno on failure.
join_session_keyringJoin the named keyring as the session keyring if possible else attempt to* create a new one of that name and join that
key_change_session_keyringReplace a process's session keyring on behalf of one of its children when* the target process is about to resume userspace execution.
cap_prctl_dropImplement PR_CAPBSET_DROP. Attempt to remove the specified capability from* the current task's bounding set. Returns 0 on success, -ve on error.
cap_task_prctlap_task_prctl - Implement process control functions for this security module*@option: The process control function requested*@arg2, @arg3, @arg4, @arg5: The argument data for this function* Allow process control functions (sys_prctl()) to alter
selinux_setprocattr
smack_setprocattrsmack_setprocattr - Smack process attribute setting*@name: the name of the attribute in /proc/
aa_replace_current_labelaa_replace_current_label - replace the current tasks label*@label: new label (NOT NULL)* Returns: 0 or error on failure
aa_set_current_hataa_set_current_hat - set the current tasks hat*@label: label to set as the current hat (NOT NULL)*@token: token value that must be specified to change from the hat* Do switch of tasks hat
aa_restore_previous_labelaa_restore_previous_label - exit from hat context restoring previous label*@token: the token that must be matched to exit hat context* Attempt to return out of a hat to the previous label
ksys_unshareshare allows a process to 'unshare' part of the process* context which was originally shared using clone. copy_** functions used by do_fork() cannot be used here directly* because they modify an inactive task_struct that is being* constructed