diff options
author | Lennert Buytenhek <buytenh@wantstofly.org> | 2019-06-13 18:46:39 +0300 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2019-06-19 13:42:05 +0100 |
commit | 7afeb339062d42e5bae49e68c870971a2672333f (patch) | |
tree | ecae388c02b22bf55caacd6b61b1eee649f3bc3e /keyctl.c | |
parent | 7f4d9434de9a3d47a9e5259a31279a90c1b21451 (diff) | |
download | keyutils-7afeb339062d42e5bae49e68c870971a2672333f.tar.gz |
Make key=value argument list optional for pkey_{encrypt,decrypt,sign}
keyctl's help message suggests that including a key=value style list
of arguments is optional for the pkey_* operations, and for pkey_query
and pkey_verify it indeed seems to be optional, but the other three
operations require that at least one key=value pair be passed in.
This patch changes the logic to make key=value lists optional for
all pkey_* operations.
Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'keyctl.c')
-rw-r--r-- | keyctl.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1931,7 +1931,7 @@ static void act_keyctl_pkey_encrypt(int argc, char *argv[]) void *in, *out; char info[4096]; - if (argc < 5) + if (argc < 4) format(); pkey_parse_info(argv + 4, info); @@ -1971,7 +1971,7 @@ static void act_keyctl_pkey_decrypt(int argc, char *argv[]) void *in, *out; char info[4096]; - if (argc < 5) + if (argc < 4) format(); pkey_parse_info(argv + 4, info); @@ -2011,7 +2011,7 @@ static void act_keyctl_pkey_sign(int argc, char *argv[]) void *in, *out; char info[4096]; - if (argc < 5) + if (argc < 4) format(); pkey_parse_info(argv + 4, info); |