Re: [PATCH] KEYS: The request_key() syscall should link an existing key to the dest keyring

From: David Howells
Date: Tue Apr 27 2010 - 06:15:22 EST


Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> wrote:

> I don't think I understand that description. Are you saying that the
> patch switches things from the first example output into the second case?

request_key() system call is meant to recursively search all your keyrings for
the key you desire, and, optionally, if it doesn't exist, call out to userspace
to create one for you.

If request_key() finds or creates a key, it should, optionally, create a link
to that key from the destination keyring specified.

Therefore, if, after a successful call to request_key() with a desination
keyring specified, you see the destination keyring empty, the code didn't work
correctly.

If you see the found key in the keyring, then it did - which is what the patch
is required for.

> Is the fix needed in -stable?

Yes.

David
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/