aboutsummaryrefslogtreecommitdiffstats
path: root/scd/command.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2009-02-12 17:45:40 +0000
committerWerner Koch <[email protected]>2009-02-12 17:45:40 +0000
commit943f783de7ad3b0a7b8dcd33cc9b767e7d85a1cd (patch)
tree82f965a9a08d15b8591cd72b675f1c6a6be8ca4f /scd/command.c
parentFix bug#998. (diff)
downloadgnupg-943f783de7ad3b0a7b8dcd33cc9b767e7d85a1cd.tar.gz
gnupg-943f783de7ad3b0a7b8dcd33cc9b767e7d85a1cd.zip
New scd getinfo subcommand deny_admin
Diffstat (limited to 'scd/command.c')
-rw-r--r--scd/command.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/scd/command.c b/scd/command.c
index 8ebcdb323..f3e374c39 100644
--- a/scd/command.c
+++ b/scd/command.c
@@ -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;