]> git.baikalelectronics.ru Git - kernel.git/commit
KEYS: Skip key state checks when checking for possession
authorDavid Howells <dhowells@redhat.com>
Tue, 24 Sep 2013 09:35:13 +0000 (10:35 +0100)
committerDavid Howells <dhowells@redhat.com>
Tue, 24 Sep 2013 09:35:13 +0000 (10:35 +0100)
commita81f37362a0fd6d89eec71626c66b09b841d67fb
tree259f6872bc88d1cb4e94e405d5273c6dbc678175
parent39b1c0e90243c1e85b4f8b0dd4be489cd0d1b410
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 2cc14452bedacb96d1517b6f458aefcb9eae3918 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>
security/keys/internal.h
security/keys/process_keys.c
security/keys/request_key.c
security/keys/request_key_auth.c