From 3e0a400bdcfdd0de263b63014576401a125cd7f8 Mon Sep 17 00:00:00 2001 From: Lukas Slebodnik Date: Thu, 16 Jun 2016 19:39:26 +0200 Subject: [PATCH] SPEC: Run sssd as privileged user There are still issues with ipa and ad provider which cause failures when sssd is running as non-privileged user. It's easy to change default root to non-root mock --resultdir . --rebuild ./sssd-1.13.90-0.fc24.src.rpm --with=sssd_user or with plain rpmbuild rpmbuild -ba SPECS/sssd.spec --with sssd_user --- contrib/sssd.spec.in | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/contrib/sssd.spec.in b/contrib/sssd.spec.in index 7b4188ae3f90546e64b662a1eb3887d3bde55440..0f2bcdf6136d35e522302867786b97d28837d587 100644 --- a/contrib/sssd.spec.in +++ b/contrib/sssd.spec.in @@ -1,3 +1,7 @@ +# SSSD is running as root user by default. +# Set --with sssd_user or bcond_without to run SSSD as non-root user(sssd). +%bcond_with sssd_user + %global rhel6_minor %(%{__grep} -o "6.[0-9]*" /etc/redhat-release |%{__sed} -s 's/6.//') %global rhel7_minor %(%{__grep} -o "7.[0-9]*" /etc/redhat-release |%{__sed} -s 's/7.//') @@ -21,7 +25,7 @@ # on Fedora and RHEL7 p11_child needs a polkit config snippet to be allowed to # talk to pcscd if SSSD runs as unpriviledged user -%if (0%{?fedora} || 0%{?rhel} >= 7) +%if (%{with sssd_user} && (0%{?fedora} || 0%{?rhel} >= 7)) %global install_pcscd_polkit_rule 1 %else %global enable_polkit_rules_option --disable-polkit-rules-path @@ -599,7 +603,9 @@ autoreconf -ivf --enable-nfsidmaplibdir=%{_libdir}/libnfsidmap \ --disable-static \ --disable-rpath \ +%if %{with sssd_user} --with-sssd-user=sssd \ +%endif %{with_initscript} \ %{?with_syslog} \ %{?with_cifs_utils_plugin_option} \ -- 2.7.4