keyctl: Make it possible to specify a key by name rather than by number

Permit callers of the keyctl program to specify a key by its type and name
rather than by its number.  This is done by replacing a key ID like:

	1234

or:

	@s

with a type and name:

	%<type>:<name>

e.g.:

	%user:a

As a shorthand, leaving out the type name:

	%:<name>

e.g.:

	%:_ses

refers to a keyring of the given name.

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