Skip to content

Commit

Permalink
SYSTEMD: traverse 'sssdconfdir' symlink while chown-ing
Browse files Browse the repository at this point in the history
to support use case where /etc/sssd is a symlink.

'-H' only allows following a command line argument itself,
everything else encountered due to '-R' isn't followed.

This is an update to a20fa0f

Resolves: SSSD#7781
  • Loading branch information
alexey-tikhonov committed Jan 2, 2025
1 parent ae6a0ff commit 1c1945d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/sysv/systemd/sssd-kcm.service.in
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Also=sssd-kcm.socket

[Service]
Environment=DEBUG_LOGGER=--logger=files
ExecStartPre=+-/bin/chown -f -R -h root:@SSSD_USER@ @sssdconfdir@
ExecStartPre=+-/bin/chown -f -R -H root:@SSSD_USER@ @sssdconfdir@
ExecStartPre=+-/bin/chmod -f -R g+r @sssdconfdir@
ExecStartPre=+-/bin/sh -c "/bin/chown -f -h @SSSD_USER@:@SSSD_USER@ @secdbpath@/*.ldb"
ExecStartPre=+-/bin/chown -f -h @SSSD_USER@:@SSSD_USER@ @logpath@/sssd_kcm.log
Expand Down
2 changes: 1 addition & 1 deletion src/sysv/systemd/sssd.service.in
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ StartLimitBurst=5
[Service]
Environment=DEBUG_LOGGER=--logger=files
EnvironmentFile=-@environment_file@
ExecStartPre=+-/bin/chown -f -R -h root:@SSSD_USER@ @sssdconfdir@
ExecStartPre=+-/bin/chown -f -R -H root:@SSSD_USER@ @sssdconfdir@
ExecStartPre=+-/bin/chmod -f -R g+r @sssdconfdir@
ExecStartPre=+-/bin/sh -c "/bin/chown -f -h @SSSD_USER@:@SSSD_USER@ @dbpath@/*.ldb"
ExecStartPre=+-/bin/chown -f -R -h @SSSD_USER@:@SSSD_USER@ @gpocachepath@
Expand Down

0 comments on commit 1c1945d

Please sign in to comment.