From 13fb5e02b0bc9f2dfa9d7ff4f337681a35b8a7ce Mon Sep 17 00:00:00 2001 From: Alexey Tikhonov Date: Wed, 30 Oct 2024 14:23:48 +0100 Subject: [PATCH] chown() gpo cache recursively. If there is something in @gpocachepath@ it will be a directory with the domain name and in this directory will be the GPO directory hierarchy --- contrib/sssd.spec.in | 2 +- src/sysv/systemd/sssd.service.in | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/sssd.spec.in b/contrib/sssd.spec.in index 4fbacb959d6..c5ca9de2289 100644 --- a/contrib/sssd.spec.in +++ b/contrib/sssd.spec.in @@ -1141,7 +1141,7 @@ getent passwd sssd >/dev/null || useradd -r -g sssd -d /run/sssd -s /sbin/nologi %__chown -f -R %{sssd_user}:%{sssd_user} %{_sysconfdir}/sssd/conf.d || true %__chown -f %{sssd_user}:%{sssd_user} %{_var}/log/%{name}/*.log || true %__chown -f %{sssd_user}:%{sssd_user} %{secdbpath}/*.ldb || true -%__chown -f %{sssd_user}:%{sssd_user} %{gpocachepath}/* || true +%__chown -f -R %{sssd_user}:%{sssd_user} %{gpocachepath}/* || true %preun common %systemd_preun sssd.service diff --git a/src/sysv/systemd/sssd.service.in b/src/sysv/systemd/sssd.service.in index 37e0a63f87e..af6feed7c1f 100644 --- a/src/sysv/systemd/sssd.service.in +++ b/src/sysv/systemd/sssd.service.in @@ -15,7 +15,7 @@ ExecStartPre=+-/bin/chown -f @SSSD_USER@:@SSSD_USER@ @sssdconfdir@/sssd.conf ExecStartPre=+-/bin/chown -f -R @SSSD_USER@:@SSSD_USER@ @sssdconfdir@/conf.d ExecStartPre=+-/bin/chown -f -R @SSSD_USER@:@SSSD_USER@ @sssdconfdir@/pki ExecStartPre=+-/bin/sh -c "/bin/chown -f @SSSD_USER@:@SSSD_USER@ @dbpath@/*.ldb" -ExecStartPre=+-/bin/sh -c "/bin/chown -f @SSSD_USER@:@SSSD_USER@ @gpocachepath@/*" +ExecStartPre=+-/bin/sh -c "/bin/chown -f -R @SSSD_USER@:@SSSD_USER@ @gpocachepath@/*" ExecStartPre=+-/bin/sh -c "/bin/chown -f @SSSD_USER@:@SSSD_USER@ @logpath@/*.log" ExecStart=@sbindir@/sssd -i ${DEBUG_LOGGER} Type=notify