Skip to content

Commit

Permalink
BUILD: Install ldap_child and as setuid if running under non-privileg…
Browse files Browse the repository at this point in the history
…ed user

The ldap_child permissions should be 4750, owned by root.sssd,
to make sure only root and sssd can execute the child and if executed by
sssd, the child will run as root.

Reviewed-by: Michal Židek <[email protected]>
  • Loading branch information
jhrozek committed Nov 5, 2014
1 parent f9f513e commit 45414c1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -2844,6 +2844,11 @@ else
$(MKDIR_P) $(DESTDIR)$(initdir)
endif

if SSSD_USER
chgrp $(SSSD_USER) $(sssdlibexecdir)/ldap_child
chmod 4750 $(sssdlibexecdir)/ldap_child
endif

install-data-hook:
rm $(DESTDIR)/$(nsslibdir)/libnss_sss.so.2 \
$(DESTDIR)/$(nsslibdir)/libnss_sss.so
Expand Down
2 changes: 1 addition & 1 deletion contrib/sssd.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -645,7 +645,7 @@ rm -rf $RPM_BUILD_ROOT
%defattr(-,root,root,-)
%doc COPYING
%{_libdir}/%{name}/libsss_krb5_common.so
%{_libexecdir}/%{servicename}/ldap_child
%attr(4750,root,sssd) %{_libexecdir}/%{servicename}/ldap_child
%{_libexecdir}/%{servicename}/krb5_child

%files krb5 -f sssd_krb5.lang
Expand Down

0 comments on commit 45414c1

Please sign in to comment.