diff options
author | Tanguy Raufflet <tanguy.raufflet@savoirfairelinux.com> | 2024-10-23 15:05:40 +0200 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2024-10-24 05:52:19 -0700 |
commit | 9527f0046777b4fbee5ec277c3e6e8b3034e71af (patch) | |
tree | 5573b725c38b0b45f104f3b43c79f41cb8ea0172 | |
parent | 6f6aa306025eb63c3ad1320d885d720c11834095 (diff) | |
download | meta-openembedded-9527f0046777b4fbee5ec277c3e6e8b3034e71af.tar.gz |
netdata: add setuid to the xenstat plugin file
As mentioned in the Netdata documentation [1], The xenstat plugin
requires elevated privileges to be executed. The xenstat.plugin
permissions are modified to only allow users belonging to the netdata
group to execute the plugin with root privileges.
[1] https://learn.netdata.cloud/docs/collecting-metrics/containers-and-vms/xen-xcp-ng
Signed-off-by: Tanguy Raufflet <tanguy.raufflet@savoirfairelinux.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r-- | meta-webserver/recipes-webadmin/netdata/netdata_1.47.3.bb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/meta-webserver/recipes-webadmin/netdata/netdata_1.47.3.bb b/meta-webserver/recipes-webadmin/netdata/netdata_1.47.3.bb index 3b9ae9ca89..bc73e40eff 100644 --- a/meta-webserver/recipes-webadmin/netdata/netdata_1.47.3.bb +++ b/meta-webserver/recipes-webadmin/netdata/netdata_1.47.3.bb | |||
@@ -87,6 +87,12 @@ do_install:append() { | |||
87 | chmod 4750 ${D}${libexecdir}/netdata/plugins.d/apps.plugin | 87 | chmod 4750 ${D}${libexecdir}/netdata/plugins.d/apps.plugin |
88 | rm -rf ${D}/${localstatedir}/ | 88 | rm -rf ${D}/${localstatedir}/ |
89 | 89 | ||
90 | if ${@bb.utils.contains('PACKAGECONFIG', 'xenstat', 'true', 'false', d)}; then | ||
91 | # Set S UID for xenstat plugin | ||
92 | chown root:netdata ${D}${libexecdir}/netdata/plugins.d/xenstat.plugin | ||
93 | chmod 4750 ${D}${libexecdir}/netdata/plugins.d/xenstat.plugin | ||
94 | fi | ||
95 | |||
90 | if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then | 96 | if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then |
91 | # Install systemd unit files | 97 | # Install systemd unit files |
92 | install -Dm 0644 ${UNPACKDIR}/netdata-volatiles.conf ${D}${sysconfdir}/tmpfiles.d/netdata.conf | 98 | install -Dm 0644 ${UNPACKDIR}/netdata-volatiles.conf ${D}${sysconfdir}/tmpfiles.d/netdata.conf |