From 5562659f9462d4b4ee7a7c44303092a3261e0c1a Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Aug 09 2008 12:49:54 +0000 Subject: fix SElinux AVC --- diff --git a/glpi-check.patch b/glpi-check.patch new file mode 100644 index 0000000..1f58a45 --- /dev/null +++ b/glpi-check.patch @@ -0,0 +1,26 @@ +--- inc/common.function.php.orig 2008-08-09 14:14:22.000000000 +0200 ++++ inc/common.function.php 2008-08-09 14:21:16.000000000 +0200 +@@ -601,8 +601,7 @@ + GLPI_CONFIG_DIR => $LANG["install"][23], + GLPI_SESSION_DIR => $LANG["install"][50], + GLPI_CRON_DIR => $LANG["install"][52], +- GLPI_CACHE_DIR => $LANG["install"][99], +- GLPI_LOG_DIR => $LANG["install"][53] ++ GLPI_CACHE_DIR => $LANG["install"][99] + ); + $error=0; + foreach ($dir_to_check as $dir => $message){ +@@ -633,6 +632,13 @@ + break; + } + } ++ echo "".$LANG["install"][53].""; ++ if (error_log("Test\n", 3, GLPI_LOG_DIR."/php-errors.log")) { ++ echo "".$LANG["install"][20].""; ++ } else { ++ echo "

".$LANG["install"][19]."

".$LANG["install"][97]."'".GLPI_LOG_DIR."'. ".$LANG["install"][98].""; ++ $error=1; ++ } + return $error; + } + diff --git a/glpi-logrotate b/glpi-logrotate index a4bb2bd..e25627f 100644 --- a/glpi-logrotate +++ b/glpi-logrotate @@ -6,4 +6,5 @@ compress notifempty missingok + create 644 apache apache } diff --git a/glpi.spec b/glpi.spec index 64af2e1..1eaa1b2 100644 --- a/glpi.spec +++ b/glpi.spec @@ -6,7 +6,7 @@ Name: glpi Version: 0.71.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Free IT asset management software Summary(fr): Gestion Libre de Parc Informatique @@ -19,6 +19,10 @@ Source1: glpi-httpd.conf Source2: glpi-config_path.php Source3: glpi-logrotate +# Avoid SELinux AVC when testing write access to log file. +Patch0: glpi-check.patch + + BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch @@ -61,6 +65,8 @@ techniciens grâce à une maintenance plus cohérente. %prep %setup -q -n glpi +%patch0 -p0 + %if 0%{?rhel} == 4 # use bundled lib @@ -222,6 +228,10 @@ fi %changelog +* Sat Aug 09 2008 Remi Collet - 0.71.1-2 +- fix SElinux bug on install test (glpi-check.patch) +- add create option on logrotate conf + * Fri Aug 01 2008 Remi Collet - 0.71.1-1 - update to 0.71.1 bugfix - use system cron