From 454aa613265e6e31138112a424d4f0fa130f315f Mon Sep 17 00:00:00 2001 From: Yuxing Jiang Date: Fri, 17 Jul 2020 13:43:06 -0400 Subject: [PATCH] Modify access privilege and ownership of fm config This commit modifies the ownership and access privilege of the fault manager config file to the fm user only. Verified the ownership and permission of /etc/fm/fm.conf after successfully installed and unlocked a controller. No extra error message is produced in fm-manager.log and fm-event.log. And fm commands are functional. Change-Id: Ief675bbe08c00bb106b7fdd6b5db46364192c69c Closes-Bug: 1887444 Signed-off-by: Yuxing Jiang --- fm-rest-api/centos/fm-rest-api.spec | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fm-rest-api/centos/fm-rest-api.spec b/fm-rest-api/centos/fm-rest-api.spec index 25b23192..b28592bc 100644 --- a/fm-rest-api/centos/fm-rest-api.spec +++ b/fm-rest-api/centos/fm-rest-api.spec @@ -21,6 +21,7 @@ BuildRequires: python-oslo-middleware Requires: python-eventlet Requires: python-webob Requires: python-paste +Requires: setup BuildRequires: systemd @@ -67,7 +68,7 @@ install -p -D -m 644 fm-api-pmond.conf %{buildroot}%{local_etc_pmond}/fm-api.con # install default config files cd %{_builddir}/%{name}-%{version} && oslo-config-generator --config-file fm/config-generator.conf --output-file %{_builddir}/%{name}-%{version}/fm.conf.sample -install -p -D -m 644 %{_builddir}/%{name}-%{version}/fm.conf.sample %{buildroot}%{_sysconfdir}/fm/fm.conf +install -p -D -m 600 %{_builddir}/%{name}-%{version}/fm.conf.sample %{buildroot}%{_sysconfdir}/fm/fm.conf %clean echo "CLEAN CALLED" @@ -88,7 +89,7 @@ rm -rf $RPM_BUILD_ROOT %{pythonroot}/fm-%{version}*.egg-info -%config(noreplace) %{_sysconfdir}/fm/fm.conf +%config(noreplace) %attr(600,fm,fm)%{_sysconfdir}/fm/fm.conf # systemctl service files %{_unitdir}/fm-api.service