Skip to content

Commit

Permalink
SPEC: clean up mem-cache files on uninstall
Browse files Browse the repository at this point in the history
instead of tracking those files as a part of a package.

This will allow to get rid of `fchown()` in responder/nss/nsssrv_mmap_cache.c

Reviewed-by: Justin Stephenson <[email protected]>
Reviewed-by: Pavel Březina <[email protected]>
Reviewed-by: Sumit Bose <[email protected]>
  • Loading branch information
alexey-tikhonov committed Jan 30, 2024
1 parent dd7aaaf commit ec77ec4
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions contrib/sssd.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ Requires: (libsss_autofs%{?_isa} = %{version}-%{release} if autofs)
Requires: (sssd-nfs-idmap = %{version}-%{release} if libnfsidmap)
Requires: libsss_idmap = %{version}-%{release}
Requires: libsss_certmap = %{version}-%{release}
Requires(postun): coreutils
%if 0%{?rhel}
Requires(pre): shadow-utils
%endif
Expand Down Expand Up @@ -788,9 +789,6 @@ install -D -p -m 0644 contrib/sssd.sysusers %{buildroot}%{_sysusersdir}/sssd.con
%attr(775,%{sssd_user},%{sssd_user}) %dir %{mcpath}
%attr(700,root,root) %dir %{secdbpath}
%attr(751,%{sssd_user},%{sssd_user}) %dir %{deskprofilepath}
%ghost %attr(0664,%{sssd_user},%{sssd_user}) %verify(not md5 size mtime) %{mcpath}/passwd
%ghost %attr(0664,%{sssd_user},%{sssd_user}) %verify(not md5 size mtime) %{mcpath}/group
%ghost %attr(0664,%{sssd_user},%{sssd_user}) %verify(not md5 size mtime) %{mcpath}/initgroups
%attr(755,%{sssd_user},%{sssd_user}) %dir %{pipepath}
%attr(750,%{sssd_user},root) %dir %{pipepath}/private
%attr(755,%{sssd_user},%{sssd_user}) %dir %{pubconfpath}
Expand Down Expand Up @@ -1061,6 +1059,10 @@ getent passwd sssd >/dev/null || useradd -r -g sssd -d / -s /sbin/nologin -c "Us
%systemd_preun sssd-sudo.socket

%postun common
%__rm -f %{mcpath}/passwd
%__rm -f %{mcpath}/group
%__rm -f %{mcpath}/initgroups
%__rm -f %{mcpath}/sid
%systemd_postun_with_restart sssd-autofs.socket
%systemd_postun_with_restart sssd-nss.socket
%systemd_postun_with_restart sssd-pac.socket
Expand Down

0 comments on commit ec77ec4

Please sign in to comment.