From abd6cf6d8e6be55a6535bf27b692bdf520462c15 Mon Sep 17 00:00:00 2001 From: Michael Roth Date: Tue, 6 Dec 2011 22:03:42 -0600 Subject: guest agent: add RPC blacklist command-line option This adds a command-line option, -b/--blacklist, that accepts a comma-seperated list of RPCs to disable, or prints a list of available RPCs if passed "?". In consequence this also adds general blacklisting and RPC listing facilities to the new QMP dispatch/registry facilities, should the QMP monitor ever have a need for such a thing. Ideally, to avoid support/compatability issues in the future, blacklisting guest agent functionality will be the exceptional case, but we add the functionality here to handle guest administrators with specific requirements. Signed-off-by: Michael Roth Signed-off-by: Michael Roth Signed-off-by: Anthony Liguori --- qerror.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'qerror.c') diff --git a/qerror.c b/qerror.c index b544ced..a8ecb0f 100644 --- a/qerror.c +++ b/qerror.c @@ -65,6 +65,10 @@ static const QErrorStringTable qerror_table[] = { .desc = "The command %(name) has not been found", }, { + .error_fmt = QERR_COMMAND_DISABLED, + .desc = "The command %(name) has been disabled for this instance", + }, + { .error_fmt = QERR_DEVICE_ENCRYPTED, .desc = "Device '%(device)' is encrypted", }, -- cgit v1.1