summaryrefslogtreecommitdiffstats
path: root/security/keys/internal.h
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2013-09-24 10:35:13 +0100
committerDavid Howells <dhowells@redhat.com>2013-09-24 10:35:13 +0100
commit61ea0c0ba904a55f55317d850c1072ff7835ac92 (patch)
tree259f6872bc88d1cb4e94e405d5273c6dbc678175 /security/keys/internal.h
parent5a5f2acfd04269e2e0958067216b68ff461c285c (diff)
downloadlinux-61ea0c0ba904a55f55317d850c1072ff7835ac92.tar.bz2
KEYS: Skip key state checks when checking for possession
Skip key state checks (invalidation, revocation and expiration) when checking for possession. Without this, keys that have been marked invalid, revoked keys and expired keys are not given a possession attribute - which means the possessor is not granted any possession permits and cannot do anything with them unless they also have one a user, group or other permit. This causes failures in the keyutils test suite's revocation and expiration tests now that commit 96b5c8fea6c0861621051290d705ec2e971963f1 reduced the initial permissions granted to a key. The failures are due to accesses to revoked and expired keys being given EACCES instead of EKEYREVOKED or EKEYEXPIRED. Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'security/keys/internal.h')
-rw-r--r--security/keys/internal.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/security/keys/internal.h b/security/keys/internal.h
index d4f1468b9b50..df971feceaf2 100644
--- a/security/keys/internal.h
+++ b/security/keys/internal.h
@@ -124,6 +124,7 @@ extern key_ref_t search_my_process_keyrings(struct key_type *type,
extern key_ref_t search_process_keyrings(struct key_type *type,
const void *description,
key_match_func_t match,
+ bool no_state_check,
const struct cred *cred);
extern struct key *find_keyring_by_name(const char *name, bool skip_perm_check);