kernel-fxtec-pro1x/security/keys
David Howells 1260f801b4 [PATCH] Keys: Fix key management syscall interface bugs
This fixes five bugs in the key management syscall interface:

 (1) add_key() returns 0 rather than EINVAL if the key type is "".

     Checking the key type isn't "" should be left to lookup_user_key().

 (2) request_key() returns ENOKEY rather than EPERM if the key type begins
     with a ".".

     lookup_user_key() can't do this because internal key types begin with a
     ".".

 (3) Key revocation always returns 0, even if it fails.

 (4) Key read can return EAGAIN rather than EACCES under some circumstances.

     A key is permitted to by read by a process if it doesn't grant read
     access, but it does grant search access and it is in the process's
     keyrings. That search returns EAGAIN if it fails, and this needs
     translating to EACCES.

 (5) request_key() never adds the new key to the destination keyring if one is
     supplied.

     The wrong macro was being used to test for an error condition: PTR_ERR()
     will always return true, whether or not there's an error; this should've
     been IS_ERR().

Signed-Off-By: David Howells <dhowells@redhat.com>
Signed-Off-By: Linus Torvalds <torvalds@osdl.org>
2005-08-04 08:20:47 -07:00
..
compat.c [PATCH] Keys: Make request-key create an authorisation key 2005-06-24 00:05:19 -07:00
internal.h [PATCH] Keys: Make request-key create an authorisation key 2005-06-24 00:05:19 -07:00
key.c [PATCH] RCU: clean up a few remaining synchronize_kernel() calls 2005-06-25 16:24:38 -07:00
keyctl.c [PATCH] Keys: Fix key management syscall interface bugs 2005-08-04 08:20:47 -07:00
keyring.c [PATCH] Keys: Base keyring size on key pointer not key struct 2005-07-07 18:23:46 -07:00
Makefile [PATCH] Keys: Make request-key create an authorisation key 2005-06-24 00:05:19 -07:00
proc.c [PATCH] keys: Discard key spinlock and use RCU for key payload 2005-06-24 00:05:18 -07:00
process_keys.c [PATCH] RCU: clean up a few remaining synchronize_kernel() calls 2005-06-25 16:24:38 -07:00
request_key.c [PATCH] Keys: Fix key management syscall interface bugs 2005-08-04 08:20:47 -07:00
request_key_auth.c [PATCH] Keys: Make request-key create an authorisation key 2005-06-24 00:05:19 -07:00
user_defined.c [PATCH] eCryptfs: export user key type 2005-06-24 00:05:19 -07:00