diff options
author | Remi Collet <fedora@famillecollet.com> | 2012-02-11 09:28:17 +0100 |
---|---|---|
committer | Remi Collet <fedora@famillecollet.com> | 2012-02-11 09:28:17 +0100 |
commit | c0b61e36b30a9b08b2e3b12e2fa6c3bbccbdf547 (patch) | |
tree | c8562b4bd8f8e014d5bb39a55240a4a5197886bd | |
parent | e97722f5a1407cdb4eebece88c1b1cc3c9caecfa (diff) |
OCS Inventory NG 2.0.4
-rw-r--r-- | ocsinventory-deprecated.patch | 78 | ||||
-rw-r--r-- | ocsinventory.spec | 24 |
2 files changed, 11 insertions, 91 deletions
diff --git a/ocsinventory-deprecated.patch b/ocsinventory-deprecated.patch deleted file mode 100644 index de46c86..0000000 --- a/ocsinventory-deprecated.patch +++ /dev/null @@ -1,78 +0,0 @@ -diff -up ocsreports/plugins/main_sections/ms_dict/ms_dict.php.orig ocsreports/plugins/main_sections/ms_dict/ms_dict.php ---- ocsreports/plugins/main_sections/ms_dict/ms_dict.php.orig 2011-11-28 17:54:50.000000000 +0100 -+++ ocsreports/plugins/main_sections/ms_dict/ms_dict.php 2011-11-28 17:55:45.000000000 +0100 -@@ -37,8 +37,8 @@ if ($protectedPost['RESET']=="RESET") - unset($protectedPost['search']); - //filtre - if ($protectedPost['search']){ -- $search_cache=" and cache.name like '%".mysql_escape_string($protectedPost['search'])."%' "; -- $search_count=" and extracted like '%".mysql_escape_string($protectedPost['search'])."%' "; -+ $search_cache=" and cache.name like '%".mysql_real_escape_string($protectedPost['search'])."%' "; -+ $search_count=" and extracted like '%".mysql_real_escape_string($protectedPost['search'])."%' "; - } - else{ - $search=""; -@@ -123,7 +123,7 @@ if ($protectedPost['onglet'] == 'CAT'){ - } - $querydico=substr($querydico,0,-1); - $querydico .= " from dico_soft left join ".$table." cache on dico_soft.extracted=cache.name -- where formatted='".mysql_escape_string($list_cat[$protectedPost['onglet_soft']])."' ".$search_count." group by EXTRACTED"; -+ where formatted='".mysql_real_escape_string($list_cat[$protectedPost['onglet_soft']])."' ".$search_count." group by EXTRACTED"; - } - /*******************************************************CAS OF NEW*******************************************************/ - if ($protectedPost['onglet'] == 'NEW'){ -@@ -311,4 +311,4 @@ echo "<input type='hidden' name='RESET' - echo "<input type='hidden' name='TRANS' id='TRANS' value=''>"; - echo "<input type='hidden' name='SUP_CAT' id='SUP_CAT' value=''>"; - echo "</form>"; --?> -\ Pas de fin de ligne à la fin du fichier. -+?> -diff -up ocsreports/require/function_dico.php.orig ocsreports/require/function_dico.php ---- ocsreports/require/function_dico.php.orig 2011-11-28 17:56:55.000000000 +0100 -+++ ocsreports/require/function_dico.php 2011-11-28 17:57:01.000000000 +0100 -@@ -46,7 +46,7 @@ function trans($onglet,$list_soft,$affec - $table="softwares"; - //verif is this cat exist - if ($new_cat != ''){ -- $sql_verif="select extracted from dico_soft where formatted ='".mysql_escape_string($new_cat)."'"; -+ $sql_verif="select extracted from dico_soft where formatted ='".mysql_real_escape_string($new_cat)."'"; - $result_search_soft = mysql_query( $sql_verif, $_SESSION['OCS']["readServer"]); - $item_search_soft = mysql_fetch_object($result_search_soft); - if (isset($item_search_soft->extracted) or $new_cat == "IGNORED" or $new_cat == "UNCHANGED"){ -@@ -71,10 +71,10 @@ function trans($onglet,$list_soft,$affec - }elseif($exist_cat == "UNCHANGED"){ - $sql="insert dico_soft (extracted,formatted) select distinct NAME,NAME from ".$table." where ID in (".implode(",",$list_soft).")"; - }else -- $sql="insert dico_soft (extracted,formatted) select distinct NAME,'".mysql_escape_string($exist_cat)."' from ".$table." where ID in (".implode(",",$list_soft).")"; -+ $sql="insert dico_soft (extracted,formatted) select distinct NAME,'".mysql_real_escape_string($exist_cat)."' from ".$table." where ID in (".implode(",",$list_soft).")"; - }else{ - if (!isset($already_exist)){ -- $sql="insert dico_soft (extracted,formatted) select distinct NAME,'".mysql_escape_string($new_cat)."' from ".$table." where ID in (".implode(",",$list_soft).")"; -+ $sql="insert dico_soft (extracted,formatted) select distinct NAME,'".mysql_real_escape_string($new_cat)."' from ".$table." where ID in (".implode(",",$list_soft).")"; - }else - echo "<script>alert('".$l->g(771)."')</script>"; - } -diff -up ocsreports/require/function_table_html.php.orig ocsreports/require/function_table_html.php ---- ocsreports/require/function_table_html.php.orig 2011-11-28 17:57:10.000000000 +0100 -+++ ocsreports/require/function_table_html.php 2011-11-28 17:57:38.000000000 +0100 -@@ -163,7 +163,7 @@ function escape_string($array){ - function xml_escape_string($array){ - foreach ($array as $key=>$value){ - $trait_array[$key]=xml_encode($value); -- //$trait_array[$key]=mysql_escape_string($value); -+ //$trait_array[$key]=mysql_real_escape_string($value); - } - return ($trait_array); - } -@@ -801,8 +801,8 @@ function onglet($def_onglets,$form_name, - $current=1; - } - }else{ -- //echo "<script>alert('".mysql_escape_string(stripslashes($protectedPost[$post_name]))." => ".$key."')</script>"; -- if (mysql_escape_string(stripslashes($protectedPost[$post_name])) === mysql_escape_string(stripslashes($key)) or (!isset($protectedPost[$post_name]) and $current != 1)){ -+ //echo "<script>alert('".mysql_real_escape_string(stripslashes($protectedPost[$post_name]))." => ".$key."')</script>"; -+ if (mysql_real_escape_string(stripslashes($protectedPost[$post_name])) === mysql_real_escape_string(stripslashes($key)) or (!isset($protectedPost[$post_name]) and $current != 1)){ - echo "id='current'"; - $current=1; - } diff --git a/ocsinventory.spec b/ocsinventory.spec index ea11576..54c808a 100644 --- a/ocsinventory.spec +++ b/ocsinventory.spec @@ -11,7 +11,7 @@ Name: ocsinventory Summary: Open Computer and Software Inventory Next Generation -Version: 2.0.3 +Version: 2.0.4 Release: 1%{?dist} Group: Applications/Internet @@ -22,10 +22,6 @@ URL: http://www.ocsinventory-ng.org/ Source0: http://launchpad.net/ocsinventory-server/stable-2.0/%{version}/+download/%{tarname}-%{version}.tar.gz Source1: ocsinventory-reports.conf -# s/mysql_escape_string/mysql_real_escape_string/ -# http://bazaar.launchpad.net/~ocsinventory-core/ocsinventory-ocsreports/stable-2.0/revision/800 -Patch0: %{name}-deprecated.patch - BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: perl(ExtUtils::MakeMaker) @@ -103,12 +99,9 @@ de données. %package reports Group: Applications/Internet Summary: OCS Inventory NG - Communication server -# From PHP_Compat : date, mysql, ereg, pcre, zip, hash, xml, gd, zlib +# From phpci : curl, date, dom, imap, ldap, mysql, openssl, pcre, session, xml, zlib Requires: php -Requires: php-mysql php-gd php-domxml -%if 0%{?fedora} < 16 -Requires: php-zip -%endif +Requires: php-mysql php-gd php-xml php-imap php-ldap # Required by the original setup script, but not detected automatically : Requires: perl(DBD::mysql) # Required by ipdiscover-util.pl (nmap and nmblookup) @@ -132,8 +125,6 @@ navigateur favori. %prep %setup -q -n %{tarname}-%{version} -%patch0 -p0 - chmod -x binutils/ocs-errors cat >external-agents.conf <<EOF @@ -141,8 +132,12 @@ cat >external-agents.conf <<EOF # WARNING may not be supported by OCS NG Community ! # 1 line per agent, with full name (including version) -# Ex, to allow fusioninventory_agent, uncomment next line +# Ex, to allow fusioninventory_agent, uncomment next lines #FusionInventory-Agent_v2.1.9 +#FusionInventory-Agent_v2.1.10 +#FusionInventory-Agent_v2.1.11 +#FusionInventory-Agent_v2.1.12 +#FusionInventory-Agent_v2.1.13 EOF @@ -316,6 +311,9 @@ fi %changelog +* Sat Feb 11 2012 Remi Collet <remi@fedoraproject.org> - 2.0.4-1 +- update to 2.0.4 + * Mon Nov 28 2011 Remi Collet <Fedora@famillecollet.com> - 2.0.3-1 - update to 2.0.3 - drop patches merged upstream |