Skip to content

Commit

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

This will allow to get rid of `fchown()` in responder/nss/nsssrv_mmap_cache.c
  • Loading branch information
alexey-tikhonov committed Jan 26, 2024
1 parent 9985032 commit ce43ab6
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions contrib/sssd.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -788,9 +788,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 +1058,13 @@ 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
if [ "$1" = 0 ] ; then
rm -f %{dbpath}/*.ldb
fi
%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 ce43ab6

Please sign in to comment.