Skip to content

Commit

Permalink
SPEC/SYSTEMD: try harder making sure logs ownership matches service user
Browse files Browse the repository at this point in the history
  • Loading branch information
alexey-tikhonov committed Mar 13, 2024
1 parent f5bbe13 commit 387e666
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions contrib/sssd.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -1057,6 +1057,7 @@ getent passwd sssd >/dev/null || useradd -r -g sssd -d / -s /sbin/nologin -c "Us
%__chown %{sssd_user}:%{sssd_user} %{dbpath}/*
%__chown %{sssd_user}:%{sssd_user} %{_sysconfdir}/sssd/sssd.conf
%__chown -R %{sssd_user}:%{sssd_user} %{_sysconfdir}/sssd/conf.d
%__chown %{sssd_user}:%{sssd_user} %{_var}/log/%{name}/*.log

%preun common
%systemd_preun sssd.service
Expand Down
1 change: 1 addition & 0 deletions src/sysv/systemd/sssd-nss.service.in
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Also=sssd-nss.socket
[Service]
Environment=DEBUG_LOGGER=--logger=files
EnvironmentFile=-@environment_file@
ExecStartPre=+-/bin/chown @SSSD_USER@:@SSSD_USER@ @logpath@/sssd_nss.log
ExecStart=@libexecdir@/sssd/sssd_nss ${DEBUG_LOGGER} --socket-activated
# No capabilities:
CapabilityBoundingSet=
Expand Down

0 comments on commit 387e666

Please sign in to comment.