12 #include <linux/module.h>
37 key = key_ref_to_ptr(key_ref);
40 if (uid_eq(key->uid, cred->
fsuid)) {
41 kperm = key->perm >> 16;
47 if (gid_valid(key->gid) && key->perm & KEY_GRP_ALL) {
48 if (gid_eq(key->gid, cred->
fsgid)) {
49 kperm = key->perm >> 8;
55 kperm = key->perm >> 8;
68 if (is_key_possessed(key_ref))
69 kperm |= key->perm >> 24;
77 return security_key_permission(key_ref, cred, perm);
91 unsigned long flags = key->flags;
93 if (flags & (1 << KEY_FLAG_INVALIDATED))
97 if (flags & ((1 << KEY_FLAG_REVOKED) |
98 (1 << KEY_FLAG_DEAD)))
104 if (now.
tv_sec >= key->expiry)