fix #4759: run ceph-crash daemon with www-data group for access to conf

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2023-06-06 13:42:17 +02:00
parent 810db68029
commit f72c698a55
2 changed files with 25 additions and 0 deletions

View File

@ -0,0 +1,24 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Thomas Lamprecht <t.lamprecht@proxmox.com>
Date: Tue, 6 Jun 2023 13:36:13 +0200
Subject: [PATCH] fix #4759: run ceph-crash daemon with www-data group for
access to conf
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
---
src/ceph-crash.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/ceph-crash.in b/src/ceph-crash.in
index 0e02837fa..010d6ea2e 100755
--- a/src/ceph-crash.in
+++ b/src/ceph-crash.in
@@ -97,7 +97,7 @@ def drop_privs():
if os.getuid() == 0:
try:
ceph_uid = pwd.getpwnam("ceph").pw_uid
- ceph_gid = grp.getgrnam("ceph").gr_gid
+ ceph_gid = grp.getgrnam("www-data").gr_gid # ensure access to config in pmxcfs
os.setgroups([])
os.setgid(ceph_gid)
os.setuid(ceph_uid)

View File

@ -13,3 +13,4 @@
0017-python3.10-pep-620.patch
0018-fix-lib-fmt-v9-compat.patch
0019-define-iterators-without-std-iterator.patch
0020-fix-4759-run-ceph-crash-daemon-with-www-data-group-f.patch