]> git.baikalelectronics.ru Git - kernel.git/commit
KEYS: request_key() should return -ENOKEY if the constructed key is negative
authorDavid Howells <dhowells@redhat.com>
Fri, 6 Aug 2010 15:08:27 +0000 (16:08 +0100)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 6 Aug 2010 16:17:02 +0000 (09:17 -0700)
commitce4c9fc6e6a17c58d0f23a70d7802fa7e90b896d
tree4977d4fa275faafc0ba99a635d4c853a1f0df2a1
parent75529ebeb26fbdf78ec4f0302f0a213db25c78bb
KEYS: request_key() should return -ENOKEY if the constructed key is negative

request_key() should return -ENOKEY if the key it constructs has been
negatively instantiated.

Without this, request_key() can return an unusable key to its caller,
and if the caller then does key_validate() that won't catch the problem.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
security/keys/request_key.c