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 <yuxing.jiang@windriver.com>
This commit is contained in:
Yuxing Jiang 2020-07-17 13:43:06 -04:00
parent f555f4a717
commit 454aa61326
1 changed files with 3 additions and 2 deletions

View File

@ -21,6 +21,7 @@ BuildRequires: python-oslo-middleware
Requires: python-eventlet Requires: python-eventlet
Requires: python-webob Requires: python-webob
Requires: python-paste Requires: python-paste
Requires: setup
BuildRequires: systemd 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 # 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 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 %clean
echo "CLEAN CALLED" echo "CLEAN CALLED"
@ -88,7 +89,7 @@ rm -rf $RPM_BUILD_ROOT
%{pythonroot}/fm-%{version}*.egg-info %{pythonroot}/fm-%{version}*.egg-info
%config(noreplace) %{_sysconfdir}/fm/fm.conf %config(noreplace) %attr(600,fm,fm)%{_sysconfdir}/fm/fm.conf
# systemctl service files # systemctl service files
%{_unitdir}/fm-api.service %{_unitdir}/fm-api.service