Doc: Remove incorrect word from request-key.conf.5

Remove an incorrect word from request-key.conf.5.

Reported-by: Jiri Jaburek <jjaburek@redhat.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Add key invalidate function
TEST: fix permissions on created keys and keyrings

Recent upstream kernel commit:

    commit 96b5c8fea6c0861621051290d705ec2e971963f1
    Author: David Howells <dhowells@redhat.com>
    Date:   Tue Oct 2 19:24:56 2012 +0100
    KEYS: Reduce initial permissions on keys

reduced initial permissions and some tests are now hitting EACCES
because they don't get to use the 'possessed' key permissions, but
must instead use the user/group/other permissions only.

This particularly affects the recursion test because the test for possession
hits the recursion limit and we don't see keys of that depth as being
possessed.  To fix this, the keyrings in the recursion test are given full
user access and the eighth keyring is created elsewhere and linked in.

Signed-off-by: Jan Stancek <jstancek@redhat.com>
Signed-off-by: David Howells <dhowells@redhat.com>
TEST: A search for a revoked key should return EKEYREVOKED

A search for a revoked key should return EKEYREVOKED if that key has not yet
been gc'd.

Signed-off-by: David Howells <dhowells@redhat.com>
keyctl: Fix max depth of key tree dump

Fix the maximum depth of the key tree dump made my "keyctl show".  The depth
increases in multiples of four because it is used to determine how many spaces
to prefix each printed line with - and not multiples of one.

Signed-off-by: David Howells <dhowells@redhat.com>
keyctl: Fix the input buffer size for padd and pinstantiate

The add_key() and keyctl_instantiate() calls can take a buffer of up to 1MB,
so grab_stdin() should be using a buffer capable of holding that rather than
one limited to 64KB.

Signed-off-by: David Howells <dhowells@redhat.com>
TEST: Keyring contents aren't ordered, so can't check ordering

The contents of a keyring aren't ordered, so we can't check ordering.

Signed-off-by: David Howells <dhowells@redhat.com>