backup: Add new domain:checkpoint access control

Creating a checkpoint does not modify guest-visible state,
but does modify host resources.  Rather than reuse existing
domain:write, domain:block_write, or domain:snapshot access
controls, it seems better to introduce a new access control
specific to tasks related to checkpoints and incremental
backups of guest disk state.

Signed-off-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
Eric Blake 2018-06-13 07:04:57 -05:00
parent b736619f6e
commit 4f0438ef7c
2 changed files with 8 additions and 1 deletions

View File

@ -39,7 +39,8 @@ VIR_ENUM_IMPL(virAccessPermDomain,
"getattr", "read", "write", "read_secure",
"start", "stop", "reset",
"save", "delete",
"migrate", "snapshot", "suspend", "hibernate", "core_dump", "pm_control",
"migrate", "checkpoint", "snapshot", "suspend", "hibernate",
"core_dump", "pm_control",
"init_control", "inject_nmi", "send_input", "send_signal",
"fs_trim", "fs_freeze",
"block_read", "block_write", "mem_read",

View File

@ -186,6 +186,12 @@ typedef enum {
*/
VIR_ACCESS_PERM_DOMAIN_MIGRATE, /* Host migration */
/**
* @desc: Checkpoint domain
* @message: Checkpointing domain requires authorization
*/
VIR_ACCESS_PERM_DOMAIN_CHECKPOINT, /* Checkpoint disks */
/**
* @desc: Snapshot domain
* @message: Snapshotting domain requires authorization