Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:userns_install

Proto:static int userns_install(struct nsproxy *nsproxy, struct ns_common *ns)

Type:int

Parameter:

TypeParameterName
struct nsproxy *nsproxy
struct ns_common *ns
1258  user_ns = to_user_ns(ns)
1264  If user_ns == current_user_ns() Then Return -EINVAL
1268  If Not thread_group_empty(current process) Then Return -EINVAL
1271  If users != 1 Then Return -EINVAL
1274  If Not ns_capable(user_ns, Allow setting zone reclaim policy ) Then Return -EPERM
1277  cred = prepare_creds - Prepare a new set of credentials for modification* Prepare a new set of task credentials for modification
1278  If Not cred Then Return -ENOMEM
1281  put_user_ns( user_ns the caps and keyrings are relative to. )
1282  set_cred_user_ns(cred, get_user_ns(user_ns))
1284  Return 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