From: "Fabian Grünbichler" <f.gruenbichler@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [PATCH proxmox-backup 1/2] fix #2957: allow Sys.Audit access to node RRD
Date: Wed, 16 Sep 2020 11:51:12 +0200 [thread overview]
Message-ID: <20200916095113.4040822-1-f.gruenbichler@proxmox.com> (raw)
this is the same privilege needed to query the node status.
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
---
src/api2/node/rrd.rs | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/api2/node/rrd.rs b/src/api2/node/rrd.rs
index 99881461..cc18f30e 100644
--- a/src/api2/node/rrd.rs
+++ b/src/api2/node/rrd.rs
@@ -1,9 +1,10 @@
use anyhow::Error;
use serde_json::{Value, json};
-use proxmox::api::{api, Router};
+use proxmox::api::{api, Permission, Router};
use crate::api2::types::*;
+use crate::config::acl::PRIV_SYS_AUDIT;
use crate::rrd::{extract_cached_data, RRD_DATA_ENTRIES};
pub fn create_value_from_rrd(
@@ -56,6 +57,9 @@ pub fn create_value_from_rrd(
},
},
},
+ access: {
+ permission: &Permission::Privilege(&["system", "status"], PRIV_SYS_AUDIT, false),
+ },
)]
/// Read node stats
fn get_node_stats(
--
2.20.1
next reply other threads:[~2020-09-16 9:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-16 9:51 Fabian Grünbichler [this message]
2020-09-16 9:51 ` [pbs-devel] [PATCH proxmox-backup 2/2] always allow retrieving (censored) subscription info Fabian Grünbichler
2020-09-17 4:04 ` [pbs-devel] applied: " Dietmar Maurer
2020-09-17 4:03 ` [pbs-devel] applied: [PATCH proxmox-backup 1/2] fix #2957: allow Sys.Audit access to node RRD Dietmar Maurer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200916095113.4040822-1-f.gruenbichler@proxmox.com \
--to=f.gruenbichler@proxmox.com \
--cc=pbs-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox