Lines Matching refs:cred
43 static void set_cred_user_ns(struct cred *cred, struct user_namespace *user_ns) in set_cred_user_ns() argument
48 cred->securebits = SECUREBITS_DEFAULT; in set_cred_user_ns()
49 cred->cap_inheritable = CAP_EMPTY_SET; in set_cred_user_ns()
50 cred->cap_permitted = CAP_FULL_SET; in set_cred_user_ns()
51 cred->cap_effective = CAP_FULL_SET; in set_cred_user_ns()
52 cred->cap_ambient = CAP_EMPTY_SET; in set_cred_user_ns()
53 cred->cap_bset = CAP_FULL_SET; in set_cred_user_ns()
55 key_put(cred->request_key_auth); in set_cred_user_ns()
56 cred->request_key_auth = NULL; in set_cred_user_ns()
59 cred->user_ns = user_ns; in set_cred_user_ns()
82 int create_user_ns(struct cred *new) in create_user_ns()
176 int unshare_userns(unsigned long unshare_flags, struct cred **new_cred) in unshare_userns()
178 struct cred *cred; in unshare_userns() local
184 cred = prepare_creds(); in unshare_userns()
185 if (cred) { in unshare_userns()
186 err = create_user_ns(cred); in unshare_userns()
188 put_cred(cred); in unshare_userns()
190 *new_cred = cred; in unshare_userns()
1164 const struct cred *cred = file->f_cred; in new_idmap_permitted() local
1173 uid_eq(ns->owner, cred->euid)) { in new_idmap_permitted()
1177 if (uid_eq(uid, cred->euid)) in new_idmap_permitted()
1182 gid_eq(gid, cred->egid)) in new_idmap_permitted()
1339 struct cred *cred; in userns_install() local
1357 cred = nsset_cred(nsset); in userns_install()
1358 if (!cred) in userns_install()
1361 put_user_ns(cred->user_ns); in userns_install()
1362 set_cred_user_ns(cred, get_user_ns(user_ns)); in userns_install()
1364 if (set_cred_ucounts(cred) < 0) in userns_install()