2012-01-20 18:02:55 +00:00
|
|
|
/*
|
|
|
|
* viraccessperm.c: access control permissions
|
|
|
|
*
|
2014-05-02 00:05:54 +00:00
|
|
|
* Copyright (C) 2012-2014 Red Hat, Inc.
|
2012-01-20 18:02:55 +00:00
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library. If not, see
|
|
|
|
* <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <config.h>
|
|
|
|
|
|
|
|
#include "viraccessperm.h"
|
|
|
|
|
|
|
|
|
|
|
|
VIR_ENUM_IMPL(virAccessPermConnect,
|
|
|
|
VIR_ACCESS_PERM_CONNECT_LAST,
|
|
|
|
"getattr", "read", "write",
|
|
|
|
"search_domains", "search_networks",
|
|
|
|
"search_storage_pools", "search_node_devices",
|
|
|
|
"search_interfaces", "search_secrets",
|
2018-05-09 16:19:55 +00:00
|
|
|
"search_nwfilters", "search_nwfilter_bindings",
|
2013-09-12 13:35:45 +00:00
|
|
|
"detect_storage_pools", "pm_control",
|
2019-01-20 16:30:15 +00:00
|
|
|
"interface_transaction",
|
|
|
|
);
|
2012-01-20 18:02:55 +00:00
|
|
|
|
|
|
|
VIR_ENUM_IMPL(virAccessPermDomain,
|
|
|
|
VIR_ACCESS_PERM_DOMAIN_LAST,
|
|
|
|
"getattr", "read", "write", "read_secure",
|
|
|
|
"start", "stop", "reset",
|
|
|
|
"save", "delete",
|
|
|
|
"migrate", "snapshot", "suspend", "hibernate", "core_dump", "pm_control",
|
2014-05-02 00:05:54 +00:00
|
|
|
"init_control", "inject_nmi", "send_input", "send_signal",
|
|
|
|
"fs_trim", "fs_freeze",
|
2012-01-20 18:02:55 +00:00
|
|
|
"block_read", "block_write", "mem_read",
|
|
|
|
"open_graphics", "open_device", "screenshot",
|
2019-01-20 16:30:15 +00:00
|
|
|
"open_namespace", "set_time", "set_password",
|
|
|
|
);
|
2012-01-20 18:02:55 +00:00
|
|
|
|
|
|
|
VIR_ENUM_IMPL(virAccessPermInterface,
|
|
|
|
VIR_ACCESS_PERM_INTERFACE_LAST,
|
|
|
|
"getattr", "read", "write", "save",
|
2019-01-20 16:30:15 +00:00
|
|
|
"delete", "start", "stop",
|
|
|
|
);
|
2012-01-20 18:02:55 +00:00
|
|
|
|
|
|
|
VIR_ENUM_IMPL(virAccessPermNetwork,
|
|
|
|
VIR_ACCESS_PERM_NETWORK_LAST,
|
|
|
|
"getattr", "read", "write",
|
2019-01-20 16:30:15 +00:00
|
|
|
"save", "delete", "start", "stop",
|
|
|
|
);
|
2012-01-20 18:02:55 +00:00
|
|
|
|
|
|
|
VIR_ENUM_IMPL(virAccessPermNodeDevice,
|
|
|
|
VIR_ACCESS_PERM_NODE_DEVICE_LAST,
|
|
|
|
"getattr", "read", "write",
|
|
|
|
"start", "stop",
|
2019-01-20 16:30:15 +00:00
|
|
|
"detach",
|
|
|
|
);
|
2012-01-20 18:02:55 +00:00
|
|
|
|
|
|
|
VIR_ENUM_IMPL(virAccessPermNWFilter,
|
|
|
|
VIR_ACCESS_PERM_NWFILTER_LAST,
|
|
|
|
"getattr", "read", "write",
|
2019-01-20 16:30:15 +00:00
|
|
|
"save", "delete",
|
|
|
|
);
|
2012-01-20 18:02:55 +00:00
|
|
|
|
2018-05-09 16:19:55 +00:00
|
|
|
VIR_ENUM_IMPL(virAccessPermNWFilterBinding,
|
|
|
|
VIR_ACCESS_PERM_NWFILTER_BINDING_LAST,
|
|
|
|
"getattr", "read",
|
2019-01-20 16:30:15 +00:00
|
|
|
"create", "delete",
|
|
|
|
);
|
2018-05-09 16:19:55 +00:00
|
|
|
|
2012-01-20 18:02:55 +00:00
|
|
|
VIR_ENUM_IMPL(virAccessPermSecret,
|
|
|
|
VIR_ACCESS_PERM_SECRET_LAST,
|
|
|
|
"getattr", "read", "write",
|
2019-01-20 16:30:15 +00:00
|
|
|
"read_secure", "save", "delete",
|
|
|
|
);
|
2012-01-20 18:02:55 +00:00
|
|
|
|
|
|
|
VIR_ENUM_IMPL(virAccessPermStoragePool,
|
|
|
|
VIR_ACCESS_PERM_STORAGE_POOL_LAST,
|
|
|
|
"getattr", "read", "write",
|
|
|
|
"save", "delete", "start", "stop",
|
|
|
|
"refresh", "search_storage_vols",
|
2019-01-20 16:30:15 +00:00
|
|
|
"format",
|
|
|
|
);
|
2012-01-20 18:02:55 +00:00
|
|
|
|
|
|
|
VIR_ENUM_IMPL(virAccessPermStorageVol,
|
|
|
|
VIR_ACCESS_PERM_STORAGE_VOL_LAST,
|
|
|
|
"getattr", "read", "create", "delete",
|
|
|
|
"format", "resize", "data_read",
|
2019-01-20 16:30:15 +00:00
|
|
|
"data_write",
|
|
|
|
);
|