diff options
author | Mateusz Moscicki <m.moscicki2@partner.samsung.com> | 2021-03-18 12:57:46 +0100 |
---|---|---|
committer | Karol Lewandowski <k.lewandowsk@samsung.com> | 2021-03-18 16:11:39 +0100 |
commit | a80c182048a8b880783b142fb66955db6e2808d0 (patch) | |
tree | a64ab37591beb3945bea5bba234e8ac8eeab5867 | |
parent | 999767c14e45ba0d90c200354c60eda3b7aa3dc8 (diff) | |
download | crash-worker-a80c182048a8b880783b142fb66955db6e2808d0.tar.gz crash-worker-a80c182048a8b880783b142fb66955db6e2808d0.tar.bz2 crash-worker-a80c182048a8b880783b142fb66955db6e2808d0.zip |
spec: Fix crash_root directory permission
Change-Id: Id2f1f4ac5fb2f160011d5ccb1976645f8b853d55
-rw-r--r-- | packaging/crash-worker.spec | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/packaging/crash-worker.spec b/packaging/crash-worker.spec index 18d8860..d52aac1 100644 --- a/packaging/crash-worker.spec +++ b/packaging/crash-worker.spec @@ -69,8 +69,6 @@ Requires: %{name}-dumpsystemstate-service = %{version}-%{release} %if %{with regdumper} Requires: %{name}-support-regdump = %{version}-%{release} %endif -# Ensure crash_worker user is available (created by security-config, package provides crash_worker-owned files) -Requires: security-config %description %package dumpsystemstate-config @@ -114,6 +112,8 @@ Provides: %{name}-livedumper = %{version}-%{release} Summary: package provides common components needed to support both kernel-invoked coredump and livedump Requires: %{name}-dumpsystemstate-util = %{version}-%{release} Requires: zip +# Ensure crash_worker user is available (created by security-config, package provides crash_worker-owned files) +Requires: security-config %description support-common %package -n libcrash-manager-devel @@ -224,7 +224,6 @@ make doc rm -rf %{buildroot} %make_install mkdir -p %{buildroot}%{crash_root_path} -mkdir -p %{buildroot}%{crash_path} %if ! %{with regdumper} rm -f %{buildroot}%{_prefix}/lib/sysctl.d/70-crash-manager.conf @@ -254,9 +253,8 @@ rm -f %{buildroot}%{_includedir}/crash-manager.h rm -f %{buildroot}%{_prefix}/lib/pkgconfig/crash-manager.pc %endif -%post +%post support-common chsmack -a "System" -t %{crash_root_path} -chsmack -a "System" -t %{crash_path} if [ $1 -eq 2 ] ; then # All directories are created with appropriate permissions by @@ -272,10 +270,6 @@ fi %files %license LICENSE %manifest crash-worker.manifest -%dir %{crash_root_path} -# attr() needed because: crash-worker running as crash_worker:crash_worker (user:group) creates files/dir under this path -%attr(0775,crash_worker,crash_worker) %{crash_path} -%{upgrade_script_path}/500.crash-manager-upgrade.sh %files dumpsystemstate-util %manifest crash-worker.manifest @@ -321,11 +315,14 @@ fi %files support-common %license LICENSE LICENSE.BSD LICENSE.MIT %manifest crash-worker.manifest +# attr() needed because: crash-worker running as crash_worker:crash_worker (user:group) creates files/dir under this path +%attr(0775,crash_worker,crash_worker) %{crash_root_path} %{_libdir}/libcrash-manager.so.* %{_bindir}/crash-json2info %{_libexecdir}/crash-stack %{_sysconfdir}/crash-manager.conf %{_sysconfdir}/crash-manager.conf.d/crash-manager.conf.example +%{upgrade_script_path}/500.crash-manager-upgrade.sh %files -n libcrash-manager-devel %license LICENSE @@ -338,6 +335,8 @@ fi %files -n bugreport-service %license LICENSE %manifest crash-worker.manifest +# attr() needed because: crash-worker running as crash_worker:crash_worker (user:group) creates files/dir under this path +%attr(0775,crash_worker,crash_worker) %{crash_root_path} %attr(0750,crash_worker,crash_worker) %{_bindir}/bugreport-service %attr(-,root,root) %{_unitdir}/bugreport.service %attr(-,root,root) %{_sysconfdir}/dbus-1/system.d/bugreport-service.conf |