Function report |
Source Code:kernel\user_namespace.c |
Create Date:2022-07-28 11:18:53 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name: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.
Proto:int create_user_ns(struct cred *new)
Type:int
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct cred * | new |
| 81 | ucounts = inc_user_namespaces(parent_ns, owner) |
| 92 | If current_chrooted() Then Go to fail_dec |
| 100 | If Not kuid_has_mapping(parent_ns, owner) || Not kgid_has_mapping(parent_ns, group) Then Go to 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 | When i < UCOUNT_COUNTS cycle |
| 122 | ucount_max[i] = INT_MAX |
| 127 | mutex_lock( & userns_state_mutex) |
| 133 | init_rwsem( & keyring_sem) |
| 136 | If Not setup_userns_sysctls(ns) Then Go to fail_keyring |
| 139 | set_cred_user_ns(new, ns) |
| 140 | Return 0 |
| 141 | fail_keyring : |
| 145 | ns_free_inum( & ns) |
| 146 | fail_free : |
| 148 | fail_dec : |
| 150 | fail : |
| 151 | Return ret |
| Name | Describe |
|---|---|
| unshare_userns | |
| copy_creds | Copy a certificate |
| 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 |