From ccc5adbaf732b0ae9687eb08dfceef166ee251ff Mon Sep 17 00:00:00 2001 From: Scott Cantor Date: Thu, 26 Feb 2015 16:27:07 +0000 Subject: [PATCH] https://issues.shibboleth.net/jira/browse/SSPCPP-646 --- configs/Makefile.am | 2 +- configs/shibd-amazon.in | 3 +++ configs/shibd-redhat.in | 3 +++ configs/shibd-suse.in | 3 +++ shibboleth.spec.in | 13 ++++++++++++- 5 files changed, 22 insertions(+), 2 deletions(-) diff --git a/configs/Makefile.am b/configs/Makefile.am index 8386c7d..551908e 100644 --- a/configs/Makefile.am +++ b/configs/Makefile.am @@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign pkglibdir = ${libdir}/@PACKAGE_NAME@ pkglogdir = ${localstatedir}/log/@PACKAGE_NAME@ -shirelogdir = ${localstatedir}/log/httpd +shirelogdir = ${localstatedir}/log/@PACKAGE_NAME@-www pkgxmldir = $(datadir)/xml/@PACKAGE_NAME@ pkgwebdir = $(datadir)/@PACKAGE_NAME@ pkgrundir = $(localstatedir)/run/@PACKAGE_NAME@ diff --git a/configs/shibd-amazon.in b/configs/shibd-amazon.in index 25ef4a2..1668333 100644 --- a/configs/shibd-amazon.in +++ b/configs/shibd-amazon.in @@ -56,6 +56,9 @@ start() { chown -R $SHIBD_USER:$SHIBD_USER @-PKGRUNDIR-@ 2>/dev/null || : daemon --user $SHIBD_USER $shibd -p $pidfile -f -w 30 + # Adjust native logging directory permission so log roll-over works + chown apache:apache @-SHIRELOGDIR-@ + RETVAL=$? echo [ $RETVAL -eq 0 ] && touch $lockfile diff --git a/configs/shibd-redhat.in b/configs/shibd-redhat.in index 25ef4a2..1668333 100644 --- a/configs/shibd-redhat.in +++ b/configs/shibd-redhat.in @@ -56,6 +56,9 @@ start() { chown -R $SHIBD_USER:$SHIBD_USER @-PKGRUNDIR-@ 2>/dev/null || : daemon --user $SHIBD_USER $shibd -p $pidfile -f -w 30 + # Adjust native logging directory permission so log roll-over works + chown apache:apache @-SHIRELOGDIR-@ + RETVAL=$? echo [ $RETVAL -eq 0 ] && touch $lockfile diff --git a/configs/shibd-suse.in b/configs/shibd-suse.in index 5c8d43f..8751a41 100644 --- a/configs/shibd-suse.in +++ b/configs/shibd-suse.in @@ -57,6 +57,9 @@ case "$1" in # Handle transition from root to non-root packages. chown -R $SHIBD_USER:$SHIBD_USER @-PKGRUNDIR-@ 2>/dev/null || : + # Adjust native logging directory permission so log roll-over works + chown wwwrun:www @-SHIRELOGDIR-@ + echo -n "Starting $DESC ($NAME)" ## Start daemon with startproc(8). If this fails ## the echo return value is set appropriate. diff --git a/shibboleth.spec.in b/shibboleth.spec.in index 32a6a47..b0d3d0c 100644 --- a/shibboleth.spec.in +++ b/shibboleth.spec.in @@ -314,6 +314,16 @@ fi %dir %{_libdir}/shibboleth %{_libdir}/shibboleth/* %attr(0750,%{runuser},%{runuser}) %dir %{_localstatedir}/log/shibboleth +%if "%{_vendor}" == "redhat" || "%{_vendor}" == "amazon" || "%{_vendor}" == "suse" +%if "%{_vendor}" == "redhat" || "%{_vendor}" == "amazon" +%attr(0750,apache,apache) %dir %{_localstatedir}/log/shibboleth-www +%endif +%if "%{_vendor}" == "suse" +%attr(0750,wwwrun,www) %dir %{_localstatedir}/log/shibboleth-www +%endif +%else +%attr(0750,-,-) %dir %{_localstatedir}/log/shibboleth-www +%endif %if 0%{?suse_version} < 1300 %attr(0755,%{runuser},%{runuser}) %dir %{_localstatedir}/run/shibboleth %endif @@ -349,8 +359,9 @@ fi %doc %{pkgdocdir}/api %changelog -* Mon Jan 19 2015 Scott Cantor - 2.5.4-1 +* Wed Feb 25 2015 Scott Cantor - 2.5.4-1 - Add Amazon VM support +- Add a separate native logging directory * Mon Nov 17 2014 Scott Cantor - 2.5.3-2 - Add libtool dep for OpenSUSE 13 -- 2.1.4