函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\user_namespace.c Create Date:2022-07-27 12:21:31
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:unshare_userns

函数原型:int unshare_userns(unsigned long unshare_flags, struct cred **new_cred)

返回类型:int

参数:

类型参数名称
unsigned longunshare_flags
struct cred **new_cred
157  err等于负ENOMEM
159  如果非unshare_flags按位与新用户空间的值则返回:0
162  cred等于prepare_creds - Prepare a new set of credentials for modification* Prepare a new set of task credentials for modification
163  如果cred
164  err等于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.
165  如果errput_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
167  否则new_cred等于cred
171  返回:err