1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +02:00

New scd getinfo subcommand deny_admin

This commit is contained in:
Werner Koch 2009-02-12 17:45:40 +00:00
parent 02890eedd8
commit 943f783de7
5 changed files with 16 additions and 5 deletions

View file

@ -1,3 +1,7 @@
2009-02-12 Werner Koch <wk@g10code.com>
* command.c (cmd_getinfo): Add new subcommand "deny_admin".
2009-01-28 Werner Koch <wk@g10code.com>
* scdaemon.c (main): Make --allow-admin the default and make the

View file

@ -1557,6 +1557,10 @@ cmd_unlock (assuan_context_t ctx, char *line)
reader_list - Return a list of detected card readers. Does
currently only work with the internal CCID driver.
deny_admin - Returns OK if admin commands are not allowed or
GPG_ERR_GENERAL if admin commands are allowed.
*/
static int
@ -1622,6 +1626,8 @@ cmd_getinfo (assuan_context_t ctx, char *line)
rc = gpg_error (GPG_ERR_NO_DATA);
xfree (s);
}
else if (!strcmp (line, "deny_admin"))
rc = opt.allow_admin? gpg_error (GPG_ERR_GENERAL) : 0;
else
rc = set_error (GPG_ERR_ASS_PARAMETER, "unknown value for WHAT");
return rc;