Home
last modified time | relevance | path

Searched refs:uid (Results 1 – 22 of 22) sorted by relevance

/security/keys/
Dpersistent.c44 static key_ref_t key_create_persistent(struct user_namespace *ns, kuid_t uid, in key_create_persistent() argument
62 uid, INVALID_GID, current_cred(), in key_create_persistent()
77 static long key_get_persistent(struct user_namespace *ns, kuid_t uid, in key_get_persistent() argument
89 index_key.desc_len = sprintf(buf, "_persistent.%u", from_kuid(ns, uid)); in key_get_persistent()
105 persistent_ref = key_create_persistent(ns, uid, &index_key); in key_get_persistent()
135 kuid_t uid; in keyctl_get_persistent() local
140 uid = current_uid(); in keyctl_get_persistent()
142 uid = make_kuid(ns, _uid); in keyctl_get_persistent()
143 if (!uid_valid(uid)) in keyctl_get_persistent()
149 if (!uid_eq(uid, current_uid()) && in keyctl_get_persistent()
[all …]
Dprocess_keys.c39 .uid = GLOBAL_ROOT_UID,
53 uid_t uid; in install_user_keyrings() local
58 uid = from_kuid(cred->user_ns, user->uid); in install_user_keyrings()
60 kenter("%p{%u}", user, uid); in install_user_keyrings()
75 sprintf(buf, "_uid.%u", uid); in install_user_keyrings()
79 uid_keyring = keyring_alloc(buf, user->uid, INVALID_GID, in install_user_keyrings()
92 sprintf(buf, "_uid_ses.%u", uid); in install_user_keyrings()
97 keyring_alloc(buf, user->uid, INVALID_GID, in install_user_keyrings()
146 keyring = keyring_alloc("_tid", new->uid, new->gid, new, in install_thread_keyring_to_cred()
193 keyring = keyring_alloc("_pid", new->uid, new->gid, new, in install_process_keyring_to_cred()
[all …]
Dproc.c92 if (kuid_has_mapping(user_ns, key->user->uid)) in key_serial_next()
129 if (kuid_has_mapping(user_ns, minkey->user->uid)) in find_ge_key()
260 from_kuid_munged(seq_user_ns(m), key->uid), in proc_keys_show()
278 if (kuid_has_mapping(user_ns, user->uid)) in __key_user_next()
338 unsigned maxkeys = uid_eq(user->uid, GLOBAL_ROOT_UID) ? in proc_key_users_show()
340 unsigned maxbytes = uid_eq(user->uid, GLOBAL_ROOT_UID) ? in proc_key_users_show()
344 from_kuid_munged(seq_user_ns(m), user->uid), in proc_key_users_show()
Dkey.c54 struct key_user *key_user_lookup(kuid_t uid) in key_user_lookup() argument
69 if (uid_lt(uid, user->uid)) in key_user_lookup()
71 else if (uid_gt(uid, user->uid)) in key_user_lookup()
99 candidate->uid = uid; in key_user_lookup()
229 kuid_t uid, kgid_t gid, const struct cred *cred, in key_alloc() argument
254 user = key_user_lookup(uid); in key_alloc()
261 unsigned maxkeys = uid_eq(uid, GLOBAL_ROOT_UID) ? in key_alloc()
263 unsigned maxbytes = uid_eq(uid, GLOBAL_ROOT_UID) ? in key_alloc()
296 key->uid = uid; in key_alloc()
380 unsigned maxbytes = uid_eq(key->user->uid, GLOBAL_ROOT_UID) ? in key_payload_reserve()
Dkeyctl.c628 from_kuid_munged(current_user_ns(), key->uid), in keyctl_describe_key()
831 kuid_t uid; in keyctl_chown_key() local
834 uid = make_kuid(current_user_ns(), user); in keyctl_chown_key()
837 if ((user != (uid_t) -1) && !uid_valid(uid)) in keyctl_chown_key()
861 if (user != (uid_t) -1 && !uid_eq(key->uid, uid)) in keyctl_chown_key()
871 if (user != (uid_t) -1 && !uid_eq(uid, key->uid)) { in keyctl_chown_key()
873 newowner = key_user_lookup(uid); in keyctl_chown_key()
879 unsigned maxkeys = uid_eq(uid, GLOBAL_ROOT_UID) ? in keyctl_chown_key()
881 unsigned maxbytes = uid_eq(uid, GLOBAL_ROOT_UID) ? in keyctl_chown_key()
911 key->uid = uid; in keyctl_chown_key()
[all …]
Dinternal.h62 kuid_t uid; member
71 extern struct key_user *key_user_lookup(kuid_t uid);
253 static inline long keyctl_get_persistent(uid_t uid, key_serial_t destring) in keyctl_get_persistent() argument
Dpermission.c40 if (uid_eq(key->uid, cred->fsuid)) { in key_task_permission()
Dkeyring.c494 struct key *keyring_alloc(const char *description, kuid_t uid, kgid_t gid, in keyring_alloc() argument
504 uid, gid, cred, perm, flags, restrict_link); in keyring_alloc()
1126 if (!kuid_has_mapping(current_user_ns(), keyring->user->uid)) in find_keyring_by_name()
/security/integrity/ima/
Dima_policy.c65 kuid_t uid; member
110 .uid = GLOBAL_ROOT_UID, .uid_op = &uid_eq,
122 .uid = GLOBAL_ROOT_UID, .uid_op = &uid_eq,
125 .uid = GLOBAL_ROOT_UID, .uid_op = &uid_eq,
271 if ((rule->flags & IMA_UID) && !rule->uid_op(cred->uid, rule->uid)) in ima_match_rules()
275 if (!rule->uid_op(cred->euid, rule->uid) in ima_match_rules()
276 && !rule->uid_op(cred->suid, rule->uid) in ima_match_rules()
277 && !rule->uid_op(cred->uid, rule->uid)) in ima_match_rules()
279 } else if (!rule->uid_op(cred->euid, rule->uid)) in ima_match_rules()
618 entry->uid = INVALID_UID; in ima_parse_rule()
[all …]
/security/
Dcommoncap.c755 if (has_cap && !uid_eq(new->uid, root_uid) && uid_eq(new->euid, root_uid)) { in cap_bprm_set_creds()
766 if (uid_eq(new->euid, root_uid) || uid_eq(new->uid, root_uid)) { in cap_bprm_set_creds()
786 is_setid = !uid_eq(new->euid, old->uid) || !gid_eq(new->egid, old->gid); in cap_bprm_set_creds()
795 new->euid = new->uid; in cap_bprm_set_creds()
841 !uid_eq(new->euid, root_uid) || !uid_eq(new->uid, root_uid) || in cap_bprm_set_creds()
858 } else if (!uid_eq(new->uid, root_uid)) { in cap_bprm_set_creds()
967 if ((uid_eq(old->uid, root_uid) || in cap_emulate_setxuid()
970 (!uid_eq(new->uid, root_uid) && in cap_emulate_setxuid()
Dsecurity.c595 int security_path_chown(const struct path *path, kuid_t uid, kgid_t gid) in security_path_chown() argument
599 return call_int_hook(path_chown, 0, path, uid, gid); in security_path_chown()
/security/tomoyo/
Dtomoyo.c370 static int tomoyo_path_chown(const struct path *path, kuid_t uid, kgid_t gid) in tomoyo_path_chown() argument
373 if (uid_valid(uid)) in tomoyo_path_chown()
375 from_kuid(&init_user_ns, uid)); in tomoyo_path_chown()
Daudit.c198 from_kuid(&init_user_ns, stat->uid), in tomoyo_print_header()
207 from_kuid(&init_user_ns, stat->uid), in tomoyo_print_header()
Dcondition.c721 stat->uid = inode->i_uid; in tomoyo_get_attributes()
974 value = from_kuid(&init_user_ns, stat->uid); in tomoyo_condition()
Dcommon.h565 kuid_t uid; member
Dcommon.c930 (!uid_eq(task->cred->uid, GLOBAL_ROOT_UID) || in tomoyo_manager()
/security/apparmor/
Dfile.c181 NULL, NULL, cond->uid, info, error)); in path_name()
242 if (uid_eq(current_fsuid(), cond->uid)) { in aa_compute_fperms()
297 cond->uid, NULL, e); in __aa_path_perm()
451 NULL, cond->uid, info, error); in profile_path_link()
523 .uid = file_inode(file)->i_uid, in __file_path_perm()
Dlsm.c263 cond.uid = inode->i_uid; in common_perm_rm()
381 static int apparmor_path_chown(const struct path *path, kuid_t uid, kgid_t gid) in apparmor_path_chown() argument
Ddomain.c591 cond->uid, info, error); in profile_transition()
682 NULL, onexec, cond->uid, info, error); in profile_onexec()
/security/integrity/
Dintegrity_audit.c44 from_kuid(&init_user_ns, current_cred()->uid), in integrity_audit_msg()
/security/integrity/evm/
Devm_crypto.c147 uid_t uid; in hmac_add_misc() member
168 hmac_misc.uid = from_kuid(&init_user_ns, inode->i_uid); in hmac_add_misc()
/security/apparmor/include/
Dfile.h106 kuid_t uid; member