函数逻辑报告 |
Source Code:kernel\user_namespace.c |
Create Date:2022-07-27 12:21:29 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称: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.
函数原型:int create_user_ns(struct cred *new)
返回类型:int
参数:
类型 | 参数 | 名称 |
---|---|---|
struct cred * | new |
92 | 如果current_chrooted()则转到:fail_dec |
100 | 如果非kuid_has_mapping(parent_ns, owner)或非kgid_has_mapping(parent_ns, group)则转到:fail_dec |
109 | ret等于ns_alloc_inum( & ns) |
112 | ops等于userns_operations |
114 | atomic_set( & count, 1) |
120 | INIT_WORK( & work, free_user_ns) |
121 | 以i小于UCOUNT_COUNTS循环 |
122 | ucount_max[i]等于INT_MAX |
127 | mutex_lock( & userns_state_mutex) |
132 | 初始化链表头 |
133 | init_rwsem( & keyring_sem) |
136 | 如果非setup_userns_sysctls(ns)则转到:fail_keyring |
139 | set_cred_user_ns(new, ns) |
140 | 返回:0 |
141 | fail_keyring : |
145 | ns_free_inum( & ns) |
146 | fail_free : |
147 | kmem_cache_free(user_ns_cachep, ns) |
148 | fail_dec : |
150 | fail : |
151 | 返回:ret |
名称 | 描述 |
---|---|
unshare_userns | |
copy_creds | 复制信任 |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |