/security/keys/ |
H A D | permission.c | 19 * @cred: The credentials to use. 25 * The caller must hold either a ref on cred or must hold the RCU readlock. 30 int key_task_permission(const key_ref_t key_ref, const struct cred *cred, argument 40 if (uid_eq(key->uid, cred->fsuid)) { 48 if (gid_eq(key->gid, cred->fsgid)) { 53 ret = groups_search(cred->group_info, key->gid); 77 return security_key_permission(key_ref, cred, perm);
|
H A D | request_key_auth.c | 117 if (rka->cred) { 118 put_cred(rka->cred); 119 rka->cred = NULL; 132 if (rka->cred) { 133 put_cred(rka->cred); 134 rka->cred = NULL; 151 const struct cred *cred = current->cred; local 173 if (cred [all...] |
H A D | internal.h | 112 const struct cred *cred; member in struct:keyring_search_context 142 extern int install_thread_keyring_to_cred(struct cred *); 143 extern int install_process_keyring_to_cred(struct cred *); 144 extern int install_session_keyring_to_cred(struct cred *, struct key *); 173 const struct cred *cred, 190 const struct cred *cred; member in struct:request_key_auth
|
H A D | process_keys.c | 46 const struct cred *cred; local 54 cred = current_cred(); 55 user = cred->user; 56 uid = from_kuid(cred->user_ns, user->uid); 78 cred, user_keyring_perm, 94 cred, user_keyring_perm, 131 int install_thread_keyring_to_cred(struct cred *new) 150 struct cred *new; 174 int install_process_keyring_to_cred(struct cred *ne 219 install_session_keyring_to_cred(struct cred *cred, struct key *keyring) argument 454 const struct cred *cred = ctx->cred; local [all...] |
H A D | request_key.c | 56 static int umh_keys_init(struct subprocess_info *info, struct cred *cred) argument 60 return install_session_keyring_to_cred(cred, keyring); 98 const struct cred *cred = current_cred(); local 116 cred = get_current_cred(); 117 keyring = keyring_alloc(desc, cred->fsuid, cred->fsgid, cred, 120 put_cred(cred); 256 const struct cred *cred = current_cred(); local [all...] |
H A D | key.c | 201 * @cred: The credentials specifying UID namespace. 225 kuid_t uid, kgid_t gid, const struct cred *cred, 307 ret = security_key_alloc(key, cred, flags); 788 const struct cred *cred = current_cred(); local 878 cred->fsuid, cred->fsgid, cred, perm, flags); 224 key_alloc(struct key_type *type, const char *desc, kuid_t uid, kgid_t gid, const struct cred *cred, key_perm_t perm, unsigned long flags) argument
|
H A D | keyctl.c | 988 struct cred *new; 1030 const struct cred *cred = current_cred(); local 1046 instkey = cred->request_key_auth; 1204 const struct cred *cred = current_cred(); local 1223 instkey = cred->request_key_auth; 1261 struct cred *new; 1492 const struct cred *mycred, *pcred; 1495 struct cred *cre local [all...] |
H A D | keyring.c | 493 const struct cred *cred, key_perm_t perm, 500 uid, gid, cred, perm, flags); 565 ctx->cred, KEY_NEED_SEARCH) < 0) { 745 ctx->cred, KEY_NEED_SEARCH) < 0) 867 err = key_task_permission(keyring_ref, ctx->cred, KEY_NEED_SEARCH); 896 .cred = current_cred(), 492 keyring_alloc(const char *description, kuid_t uid, kgid_t gid, const struct cred *cred, key_perm_t perm, unsigned long flags, struct key *dest) argument
|
/security/integrity/ |
H A D | digsig.c | 18 #include <linux/cred.h> 68 const struct cred *cred = current_cred(); local 72 KGIDT_INIT(0), cred,
|
/security/apparmor/include/ |
H A D | context.h | 18 #include <linux/cred.h> 90 * aa_cred_profile - obtain cred's profiles 91 * @cred: cred to obtain profiles from (NOT NULL) 97 static inline struct aa_profile *aa_cred_profile(const struct cred *cred) argument 99 struct aa_task_cxt *cxt = cred_cxt(cred); 133 * This fn will not update the tasks cred to the most up to date version 146 * This fn will update the tasks cred structure if the profile has been
|
/security/tomoyo/ |
H A D | securityfs_if.c | 73 struct cred *cred = prepare_creds(); local 74 if (!cred) { 78 cred->security; 79 cred->security = new_domain; 82 commit_creds(cred);
|
H A D | tomoyo.c | 13 * @new: Pointer to "struct cred". 18 static int tomoyo_cred_alloc_blank(struct cred *new, gfp_t gfp) 27 * @new: Pointer to "struct cred". 28 * @old: Pointer to "struct cred". 33 static int tomoyo_cred_prepare(struct cred *new, const struct cred *old, 46 * @new: Pointer to "struct cred". 47 * @old: Pointer to "struct cred". 49 static void tomoyo_cred_transfer(struct cred *new, const struct cred *ol 59 tomoyo_cred_free(struct cred *cred) argument 329 tomoyo_file_open(struct file *f, const struct cred *cred) argument 548 struct cred *cred = (struct cred *) current_cred(); local [all...] |
/security/apparmor/ |
H A D | domain.c | 357 cxt = cred_cxt(bprm->cred); 552 struct aa_task_cxt *new_cxt = cred_cxt(bprm->cred); 610 const struct cred *cred; local 628 cred = get_current_cred(); 629 cxt = cred_cxt(cred); 630 profile = aa_cred_profile(cred); 727 put_cred(cred); 750 const struct cred *cred; local [all...] |
H A D | lsm.c | 49 static void apparmor_cred_free(struct cred *cred) argument 51 aa_free_task_context(cred_cxt(cred)); 52 cred_cxt(cred) = NULL; 58 static int apparmor_cred_alloc_blank(struct cred *cred, gfp_t gfp) argument 65 cred_cxt(cred) = cxt; 72 static int apparmor_cred_prepare(struct cred *new, const struct cred *old, 88 static void apparmor_cred_transfer(struct cred *ne 120 const struct cred *cred; local 139 apparmor_capable(const struct cred *cred, struct user_namespace *ns, int cap, int audit) argument 376 apparmor_file_open(struct file *file, const struct cred *cred) argument 509 const struct cred *cred = get_task_cred(task); local 884 struct cred *cred = (struct cred *)current->real_cred; local 921 struct cred *cred = (struct cred *)current->real_cred; local [all...] |
/security/ |
H A D | commoncap.c | 67 * @cred: The credentials to use 80 int cap_capable(const struct cred *cred, struct user_namespace *targ_ns, argument 92 /* See if cred has the capability in the target user namespace 98 if (ns == cred->user_ns) 99 return cap_raised(cred->cap_effective, cap) ? 0 : -EPERM; 109 if ((ns->parent == cred->user_ns) && uid_eq(ns->owner, cred->euid)) 155 const struct cred *cred, *child_cre local 187 const struct cred *cred, *child_cred; local 216 const struct cred *cred; local 606 const struct cred *cred = current_cred(); local [all...] |
H A D | capability.c | 382 static int cap_file_open(struct file *file, const struct cred *cred) argument 396 static int cap_cred_alloc_blank(struct cred *cred, gfp_t gfp) argument 401 static void cap_cred_free(struct cred *cred) argument 405 static int cap_cred_prepare(struct cred *new, const struct cred *old, gfp_t gfp) 410 static void cap_cred_transfer(struct cred *new, const struct cred *ol 896 cap_key_alloc(struct key *key, const struct cred *cred, unsigned long flags) argument 906 cap_key_permission(key_ref_t key_ref, const struct cred *cred, unsigned perm) argument [all...] |
H A D | security.c | 188 int security_capset(struct cred *new, const struct cred *old, 197 int security_capable(const struct cred *cred, struct user_namespace *ns, argument 200 return security_ops->capable(cred, ns, cap, SECURITY_CAP_AUDIT); 203 int security_capable_noaudit(const struct cred *cred, struct user_namespace *ns, argument 206 return security_ops->capable(cred, ns, cap, SECURITY_CAP_NOAUDIT); 814 int security_file_open(struct file *file, const struct cred *cred) argument 838 security_cred_alloc_blank(struct cred *cred, gfp_t gfp) argument 843 security_cred_free(struct cred *cred) argument 1447 security_key_alloc(struct key *key, const struct cred *cred, unsigned long flags) argument 1458 security_key_permission(key_ref_t key_ref, const struct cred *cred, unsigned perm) argument [all...] |
/security/integrity/ima/ |
H A D | ima_policy.c | 170 const struct cred *cred = current_cred(); local 185 if ((rule->flags & IMA_UID) && !uid_eq(rule->uid, cred->uid))
|
/security/smack/ |
H A D | smack_lsm.c | 180 static int smk_bu_credfile(const struct cred *cred, struct file *file, argument 183 struct task_smack *tsp = cred->security; 199 #define smk_bu_credfile(cred, file, mode, RC) (RC) 672 struct task_smack *bsp = bprm->cred->security; 719 struct task_smack *bsp = bprm->cred->security; 1595 struct smack_known *tkp = smk_of_task(tsk->cred->security); 1648 * @cred: task credential 1657 static int smack_file_open(struct file *file, const struct cred *cred) argument 1692 smack_cred_alloc_blank(struct cred *cred, gfp_t gfp) argument 1711 smack_cred_free(struct cred *cred) argument 3816 smack_key_alloc(struct key *key, const struct cred *cred, unsigned long flags) argument 3845 smack_key_permission(key_ref_t key_ref, const struct cred *cred, unsigned perm) argument 4261 struct cred *cred; local [all...] |
/security/selinux/ |
H A D | hooks.c | 180 struct cred *cred = (struct cred *) current->real_cred; local 188 cred->security = tsec; 194 static inline u32 cred_sid(const struct cred *cred) argument 198 tsec = cred->security; 371 const struct cred *cred) 373 const struct task_security_struct *tsec = cred 369 may_context_mount_sb_relabel(u32 sid, struct superblock_security_struct *sbsec, const struct cred *cred) argument 386 may_context_mount_inode_relabel(u32 sid, struct superblock_security_struct *sbsec, const struct cred *cred) argument 614 const struct cred *cred = current_cred(); local 1546 cred_has_capability(const struct cred *cred, int cap, int audit) argument 1595 inode_has_perm(const struct cred *cred, struct inode *inode, u32 perms, struct common_audit_data *adp) argument 1617 dentry_has_perm(const struct cred *cred, struct dentry *dentry, u32 av) argument 1632 path_has_perm(const struct cred *cred, struct path *path, u32 av) argument 1645 file_path_has_perm(const struct cred *cred, struct file *file, u32 av) argument 1664 file_has_perm(const struct cred *cred, struct file *file, u32 av) argument 1851 superblock_has_perm(const struct cred *cred, struct super_block *sb, u32 perms, struct common_audit_data *ad) argument 2055 selinux_capable(const struct cred *cred, struct user_namespace *ns, int cap, int audit) argument 2069 const struct cred *cred = current_cred(); local 2097 const struct cred *cred = current_cred(); local 2331 flush_unauthorized_files(const struct cred *cred, struct files_struct *files) argument 2659 const struct cred *cred = current_cred(); local 2678 const struct cred *cred = current_cred(); local 2692 const struct cred *cred = current_cred(); local 2703 const struct cred *cred = current_cred(); local 2725 const struct cred *cred = current_cred(); local 2858 const struct cred *cred = current_cred(); local 2865 const struct cred *cred = current_cred(); local 2891 const struct cred *cred = current_cred(); local 2933 const struct cred *cred = current_cred(); local 2958 const struct cred *cred = current_cred(); local 2969 const struct cred *cred = current_cred(); local 3095 const struct cred *cred = current_cred(); local 3102 const struct cred *cred = current_cred(); local 3201 const struct cred *cred = current_cred(); local 3245 ioctl_has_perm(const struct cred *cred, struct file *file, u32 requested, u16 cmd) argument 3282 const struct cred *cred = current_cred(); local 3330 const struct cred *cred = current_cred(); local 3395 const struct cred *cred = current_cred(); local 3429 const struct cred *cred = current_cred(); local 3437 const struct cred *cred = current_cred(); local 3506 const struct cred *cred = current_cred(); local 3511 selinux_file_open(struct file *file, const struct cred *cred) argument 3548 selinux_cred_alloc_blank(struct cred *cred, gfp_t gfp) argument 3563 selinux_cred_free(struct cred *cred) argument 5836 selinux_key_alloc(struct key *k, const struct cred *cred, unsigned long flags) argument 5864 selinux_key_permission(key_ref_t key_ref, const struct cred *cred, unsigned perm) argument [all...] |