The qdevice status endpoint retrieves some required info via writing
a status command to the qdevice socket
(/var/run/corosync-qdevice/corosync-qdevice.sock) and then parsing
the response.
Since the socket has 0755 permissions and is owned by root it can not
be written by the unprivileged pveproxy that runs as www-data user.
Relay the endpoint to the privileged pvedaemon by marking it as
`protected` to allow the end point to retrieve data from the qdevice
properly.
Fixes an issue where the api would return an empty object.
Signed-off-by: Stefan Sterz <s.sterz@proxmox.com>
Tested-by: Oguz Bektas <o.bektas@proxmox.com>
[ T: extend commit message ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
name => 'status',
path => 'qdevice',
method => 'GET',
+ protected => 1,
description => 'Get QDevice status',
permissions => {
check => ['perm', '/', [ 'Sys.Audit' ]],