]> git.proxmox.com Git - ceph.git/commitdiff
fix #4759: run ceph-crash daemon with www-data group for access to conf
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 6 Jun 2023 11:42:17 +0000 (13:42 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 6 Jun 2023 11:43:04 +0000 (13:43 +0200)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
patches/0020-fix-4759-run-ceph-crash-daemon-with-www-data-group-f.patch [new file with mode: 0644]
patches/series

diff --git a/patches/0020-fix-4759-run-ceph-crash-daemon-with-www-data-group-f.patch b/patches/0020-fix-4759-run-ceph-crash-daemon-with-www-data-group-f.patch
new file mode 100644 (file)
index 0000000..1e9b1a5
--- /dev/null
@@ -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)
index 7be383fbaba8e3f6f95a3ec97449101ef218f36a..56208f8431c9036b6c53f61a9f30220b37595bf7 100644 (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