mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-08 12:44:23 +01:00
agent: KEYATTR only allows access to attribute.
* agent/command.c (cmd_keyattr): Check the ATTRNAME. -- GnuPG-bug-id: 5988 Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
parent
2c47c66627
commit
26d5a6e862
@ -1229,6 +1229,14 @@ cmd_keyattr (assuan_context_t ctx, char *line)
|
|||||||
goto leave;
|
goto leave;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!strcmp (argv[1], "Key:") /* It allows only access to attribute */
|
||||||
|
/* Make sure ATTRNAME ends with colon. */
|
||||||
|
|| argv[1][strlen (argv[1]) - 1] != ':')
|
||||||
|
{
|
||||||
|
err = gpg_error (GPG_ERR_INV_PARAMETER);
|
||||||
|
goto leave;
|
||||||
|
}
|
||||||
|
|
||||||
err = parse_keygrip (ctx, argv[0], grip);
|
err = parse_keygrip (ctx, argv[0], grip);
|
||||||
if (err)
|
if (err)
|
||||||
goto leave;
|
goto leave;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user