Sophie

Sophie

distrib > Mageia > 5 > i586 > media > core-release-src > by-pkgid > 4185b5db5b4f9559061a6b54b52eed53 > files > 3

ocsinventory-2.1.2-3.mga5.src.rpm

diff -up etc/ocsinventory/ocsinventory-reports.conf.orig etc/ocsinventory/ocsinventory-reports.conf
--- etc/ocsinventory/ocsinventory-reports.conf.orig	2012-04-05 16:41:01.000000000 +0200
+++ etc/ocsinventory/ocsinventory-reports.conf	2012-04-05 16:41:18.000000000 +0200
@@ -24,8 +24,14 @@ Alias OCSREPORTS_ALIAS PATH_TO_OCSREPORT
 
 <Directory PATH_TO_OCSREPORTS_DIR>
     # By default, users can use console from everywhere
-    Order deny,allow
-    Allow from all
+    <IfModule mod_authz_core.c>
+       Require all granted
+    </IfModule>
+    <IfModule !mod_authz_core.c>
+       Order deny,allow
+       Allow from all
+    </IfModule>
+
     Options Indexes FollowSymLinks
     DirectoryIndex index.php
     AllowOverride Options
diff -up etc/ocsinventory/ocsinventory-server.conf.orig etc/ocsinventory/ocsinventory-server.conf
--- etc/ocsinventory/ocsinventory-server.conf.orig	2012-04-05 16:41:39.000000000 +0200
+++ etc/ocsinventory/ocsinventory-server.conf	2012-04-05 17:43:31.000000000 +0200
@@ -10,8 +10,6 @@
 # Please refer to the General Public Licence http://www.gnu.org/ or Licence.txt
 ################################################################################
 
-<IfModule mod_perl.c>
- 
   # Which version of mod_perl we are using
   # For mod_perl <= 1.999_21, replace VERSION_MP by 1
   # For mod_perl > 1.999_21, replace VERSION_MP by 2
@@ -288,13 +286,24 @@
   # "Virtual" directory for handling OCS Inventory NG agents communications
   # Be careful, do not create such directory into your web server root document !
   <Location /ocsinventory>
-	order deny,allow
-	allow from all
 	# If you protect this area you have to deal with http_auth_* agent's parameters
 	# AuthType Basic
 	# AuthName "OCS Inventory agent area"
 	# AuthUserFile "APACHE_AUTH_USER_FILE"
-	# require valid-user
+
+	<IfModule mod_authz_core.c>
+		<RequireAll> 
+			Require all granted
+			# Require valid-user
+		</RequireAll> 
+	</IfModule>
+	<IfModule !mod_authz_core.c>
+		Order deny,allow
+		Allow from all
+		# Require valid-user
+	</IfModule>
+
+
         SetHandler perl-script
         PerlHandler Apache::Ocsinventory
   </Location>
@@ -306,14 +315,22 @@
         SetHandler perl-script
         PerlHandler "Apache::Ocsinventory::SOAP"
         
-        # By default, you can query web service from everywhere with a valid user
-        Order deny,allow
-        Allow from all
        	AuthType Basic
 	AuthName "OCS Inventory SOAP Area"
 	# Use htpasswd to create/update soap-user (or another granted user)
 	AuthUserFile "APACHE_AUTH_USER_FILE"
-	require "SOAP_USER"
+
+        # By default, you can query web service from everywhere with a valid user
+	<IfModule mod_authz_core.c>
+		<RequireAll> 
+			Require all granted
+			Require valid-user
+		</RequireAll> 
+	</IfModule>
+	<IfModule !mod_authz_core.c>
+		Order deny,allow
+		Allow from all
+		Require valid-user
+	</IfModule>
   </location>
-</IfModule>