[openvas-libraries] bump to bugfix release 4.0.6
rebus
rebus at fedoraproject.org
Sat Nov 5 12:46:29 UTC 2011
commit a6acb5b6a5b5c06f36b813b3b90875bfa80317d5
Author: Michal Ambroz <rebus at seznam.cz>
Date: Sat Nov 5 13:46:00 2011 +0100
bump to bugfix release 4.0.6
.gitignore | 1 +
openvas-libraries-gnutls.patch | 1 +
openvas-libraries-lowat.patch | 3 +
openvas-libraries-notused.patch | 291 +++-----------------------------------
openvas-libraries-nowerror.patch | 4 +
openvas-libraries.spec | 28 +++-
sources | 2 +-
7 files changed, 51 insertions(+), 279 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 0549537..f5e96c5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,3 +3,4 @@
/openvas-libraries-4.0.3.tar.gz
/openvas-libraries-4.0.4.tar.gz
/openvas-libraries-4.0.5.tar.gz
+/openvas-libraries-4.0.6.tar.gz
diff --git a/openvas-libraries-gnutls.patch b/openvas-libraries-gnutls.patch
index e34c798..6addce8 100644
--- a/openvas-libraries-gnutls.patch
+++ b/openvas-libraries-gnutls.patch
@@ -2,6 +2,7 @@ Change from deprecated gnutls_*_set_priority to new gnutls_priority_set_direct
Reported upstream in bug #2526.
http://wald.intevation.org/tracker/?func=detail&atid=220&aid=2526&group_id=29
http://www.gnu.org/software/gnutls/manual/html_node/Priority-Strings.html
+Author: Michal Ambroz
diff -ru openvas-libraries-4.0.5/misc/network.c openvas-libraries-4.0.5.new/misc/network.c
--- openvas-libraries-4.0.5/misc/network.c 2011-10-07 01:45:36.406348779 +0200
+++ openvas-libraries-4.0.5.new/misc/network.c 2011-10-05 01:21:23.182790595 +0200
diff --git a/openvas-libraries-lowat.patch b/openvas-libraries-lowat.patch
index 0de009e..1e60cfa 100644
--- a/openvas-libraries-lowat.patch
+++ b/openvas-libraries-lowat.patch
@@ -1,3 +1,6 @@
+Reported as bug 2526 Fix compile time errors - gnutsl deprecated functions
+http://wald.intevation.org/tracker/index.php?func=detail&aid=2526&group_id=29&atid=220
+
diff -ru openvas-libraries-4.0.5.old/misc/network.c openvas-libraries-4.0.5/misc/network.c
--- openvas-libraries-4.0.5.old/misc/network.c 2011-07-30 22:07:44.000000000 +0200
+++ openvas-libraries-4.0.5/misc/network.c 2011-07-30 22:28:42.000000000 +0200
diff --git a/openvas-libraries-notused.patch b/openvas-libraries-notused.patch
index 2b9929a..76eaa0b 100644
--- a/openvas-libraries-notused.patch
+++ b/openvas-libraries-notused.patch
@@ -1,80 +1,15 @@
-New version of gcc used for fedora 15 is reporting errors with -Werror also for
+New version of gcc used for fedora 16 is reporting errors with -Werror also for
variables set, but never used.
-Where it was obvious I fixed the code. In other cases avoid this error by
-(void) variable
-diff -ru openvas-libraries-4.0.3.old/nasl/charcnv.c openvas-libraries-4.0.3.new/nasl/charcnv.c
---- openvas-libraries-4.0.3.old/nasl/charcnv.c 2011-03-03 09:44:22.000000000 +0100
-+++ openvas-libraries-4.0.3.new/nasl/charcnv.c 2011-03-23 00:24:39.000000000 +0100
-@@ -330,19 +330,21 @@
-
- retval = smb_iconv_ntlmssp(descriptor, &inbuf, &i_len, &outbuf, &o_len);
- if(retval==(size_t)-1) {
-+ /* variable reason set but never used
- const char *reason="unknown error";
-+ */
- switch(errno) {
- case EINVAL:
-- reason="Incomplete multibyte sequence";
-+ /* reason="Incomplete multibyte sequence"; */
- if (!conv_silent_ntlmssp)
- if (allow_bad_conv)
- goto use_as_is;
- return (size_t)-1;
- case E2BIG:
-- reason="No more room";
-+ /* reason="No more room"; */
- break;
- case EILSEQ:
-- reason="Illegal multibyte sequence";
-+ /* reason="Illegal multibyte sequence"; */
- if (allow_bad_conv)
- goto use_as_is;
-
-diff -ru openvas-libraries-4.0.3.old/nasl/nasl_builtin_openvas_tcp_scanner.c openvas-libraries-4.0.3.new/nasl/nasl_builtin_openvas_tcp_scanner.c
---- openvas-libraries-4.0.3.old/nasl/nasl_builtin_openvas_tcp_scanner.c 2011-03-03 09:44:22.000000000 +0100
-+++ openvas-libraries-4.0.3.new/nasl/nasl_builtin_openvas_tcp_scanner.c 2011-03-23 00:45:55.000000000 +0100
-@@ -691,6 +691,8 @@
- if (rtt_max[0] > 0 || ping_rtt > 0)
- {
- int y;
-+ /* avoid compile warning - y is used only in debug output */
-+ (void) y;
- if (rtt_max[0] > 0)
- y = x = rtt_max[0];
- else
-diff -ru openvas-libraries-4.0.3.old/nasl/nasl_builtin_synscan.c openvas-libraries-4.0.3.new/nasl/nasl_builtin_synscan.c
---- openvas-libraries-4.0.3.old/nasl/nasl_builtin_synscan.c 2011-03-03 09:44:22.000000000 +0100
-+++ openvas-libraries-4.0.3.new/nasl/nasl_builtin_synscan.c 2011-03-23 00:49:21.000000000 +0100
-@@ -927,7 +927,9 @@
- struct in6_addr *dst6 = plug_get_host_ip (env);
- struct in_addr *dst;
- struct in_addr inaddr;
-+#ifdef DEBUG
- struct timeval tv;
-+#endif
-
- inaddr.s_addr = dst6->s6_addr32[3];
- dst = &inaddr;
-@@ -944,14 +946,9 @@
- rtt = htonl (1 << 28);
-
- #ifdef DEBUG
-- printf ("RTT = 0x%.8x\n", ntohl (rtt));
--#endif
--
-- /** @TODO belongs to debug section? */
-+ printf ("RTT = 0x%.8x\n", ntohl (rtt));
- tv = timeval (rtt);
--
--#ifdef DEBUG
-- printf ("That's %ld seconds and %ld usecs\n", tv.tv_sec, tv.tv_usec);
-+ printf ("That's %ld seconds and %ld usecs\n", tv.tv_sec, tv.tv_usec);
- #endif
-
- struct arglist *hostinfos = arg_get_value (env, "HOSTNAME");
-diff -ru openvas-libraries-4.0.3.old/nasl/nasl_func.c openvas-libraries-4.0.3.new/nasl/nasl_func.c
---- openvas-libraries-4.0.3.old/nasl/nasl_func.c 2011-03-03 09:44:22.000000000 +0100
-+++ openvas-libraries-4.0.3.new/nasl/nasl_func.c 2011-03-23 01:22:50.000000000 +0100
+Most of the cases were already fixed in upstream code
+Where it was obvious I fixed the code.
+In other cases avoid this error by defining it as (void) variable
+Reported as bug 1942 Fix compile time errors - variable 'xxx' set but not used
+http://wald.intevation.org/tracker/index.php?func=detail&aid=1942&group_id=29&atid=220
+Version:4.0.6
+Author: Michal Ambroz
+diff -ru openvas-libraries-4.0.6/nasl/nasl_func.c openvas-libraries-4.0.6.new/nasl/nasl_func.c
+--- openvas-libraries-4.0.6/nasl/nasl_func.c 2011-11-03 09:30:08.000000000 +0100
++++ openvas-libraries-4.0.6.new/nasl/nasl_func.c 2011-11-04 23:33:50.768589674 +0100
@@ -50,6 +50,9 @@
nasl_func *v, *prev;
lex_ctxt *c;
@@ -85,180 +20,9 @@ diff -ru openvas-libraries-4.0.3.old/nasl/nasl_func.c openvas-libraries-4.0.3.ne
for (c = ctxt; c != NULL; c = c->up_ctxt)
{
for (prev = NULL, v = c->functions[h]; v != NULL; v = v->next_func)
-diff -ru openvas-libraries-4.0.3.old/nasl/nasl_host.c openvas-libraries-4.0.3.new/nasl/nasl_host.c
---- openvas-libraries-4.0.3.old/nasl/nasl_host.c 2011-03-03 09:44:22.000000000 +0100
-+++ openvas-libraries-4.0.3.new/nasl/nasl_host.c 2011-03-23 01:31:41.000000000 +0100
-@@ -155,11 +155,17 @@
- struct arglist *script_infos = lexic->script_infos;
- struct in6_addr *dst = plug_get_host_ip (script_infos);
- tree_cell *retc;
-+ /* variable inaddr set but never used
- struct in_addr inaddr;
-+ */
-
- retc = alloc_tree_cell (0, NULL);
- retc->type = CONST_INT;
-+
-+ /* inaddr set but not used causing compile time warnings
- inaddr.s_addr = dst->s6_addr32[3];
-+ */
-+
- retc->x.i_val = v6_islocalhost (dst);
- return retc;
- }
-@@ -171,11 +174,15 @@
- struct arglist *script_infos = lexic->script_infos;
- struct in6_addr *ip = plug_get_host_ip (script_infos);
- tree_cell *retc;
-- struct in_addr inaddr;
-+ /* struct in_addr inaddr; */
-
- retc = alloc_tree_cell (0, NULL);
- retc->type = CONST_INT;
-+
-+ /* inaddr not used causing compile errors
- inaddr.s_addr = ip->s6_addr32[3];
-+ */
-+
- retc->x.i_val = v6_is_local_ip (ip);
- return retc;
- }
-diff -ru openvas-libraries-4.0.3.old/nasl/nddasl_misc_funcs.c openvas-libraries-4.0.3.new/nasl/nasl_misc_funcs.c
---- openvas-libraries-4.0.3.old/nasl/nasl_misc_funcs.c 2011-03-03 09:44:22.000000000 +0100
-+++ openvas-libraries-4.0.3.new/nasl/nasl_misc_funcs.c 2011-03-23 01:33:18.000000000 +0100
-@@ -430,7 +430,8 @@
- nasl_make_array (lex_ctxt * lexic)
- {
- tree_cell *retc = NULL;
-- int i, vi;
-+ /* variable i was set but not used */
-+ int vi;
- anon_nasl_var *v, *v2;
- nasl_array *a;
-
-@@ -439,7 +440,7 @@
- retc->type = DYN_ARRAY;
- retc->x.ref_val = a = emalloc (sizeof (nasl_array));
-
-- i = vi = 0;
-+ vi = 0;
- while ((v = nasl_get_var_by_num (&lexic->ctx_vars, vi++, 0)) != NULL)
- {
- v2 = nasl_get_var_by_num (&lexic->ctx_vars, vi++, 0);
-diff -ru openvas-libraries-4.0.3.old/nasl/nasl_packet_forgery.c openvas-libraries-4.0.3.new/nasl/nasl_packet_forgery.c
---- openvas-libraries-4.0.3.old/nasl/nasl_packet_forgery.c 2011-03-03 09:44:22.000000000 +0100
-+++ openvas-libraries-4.0.3.new/nasl/nasl_packet_forgery.c 2011-03-23 01:37:37.000000000 +0100
-@@ -465,7 +465,8 @@
- tree_cell *retc;
- char *data;
- int len;
-- u_char *pkt;
-+ /* variable pkt set but not used */
-+ /* u_char *pkt; */
- struct ip *ip, *tcp_packet;
- struct tcphdr *tcp;
- int ipsz;
-@@ -492,7 +493,8 @@
- retc->type = CONST_DATA;
- tcp_packet = (struct ip *) emalloc (ipsz + sizeof (struct tcphdr) + len);
- retc->x.str_val = (char *) tcp_packet;
-- pkt = (u_char *) tcp_packet;
-+ /* variable pkt set but not used */
-+ /* pkt = (u_char *) tcp_packet; */
-
- bcopy (ip, tcp_packet, ipsz);
- /* recompute the ip checksum, because the ip length changed */
-@@ -1409,13 +1411,17 @@
- { 139, 135, 445, 80, 22, 515, 23, 21, 6000, 1025, 25, 111, 1028, 9100, 1029,
- 79, 497, 548, 5000, 1917, 53, 161, 9001, 65535, 443, 113, 993, 8080, 0 };
- int num_ports = 0;
-- struct in_addr *pinaddr;
-+ /* variable pinaddr set but not used
-+ struct in_addr *pinaddr;
-+ */
- struct in_addr inaddr;
-
- if (dst == NULL || (IN6_IS_ADDR_V4MAPPED (dst) != 1))
- return NULL;
- inaddr.s_addr = dst->s6_addr32[3];
-+ /* variable pinaddr set but not used
- pinaddr = &inaddr;
-+ */
- for (i = 0; i < sizeof (sports) / sizeof (int); i++)
- {
- if (sports[i] == 0)
-diff -ru openvas-libraries-4.0.3.old/nasl/nasl_packet_forgery_v6.c openvas-libraries-4.0.3.new/nasl/nasl_packet_forgery_v6.c
---- openvas-libraries-4.0.3.old/nasl/nasl_packet_forgery_v6.c 2011-03-03 09:44:22.000000000 +0100
-+++ openvas-libraries-4.0.3.new/nasl/nasl_packet_forgery_v6.c 2011-03-23 01:46:50.000000000 +0100
-@@ -292,9 +292,11 @@
- tree_cell *retc = alloc_tree_cell (0, NULL);
- struct ip6_hdr *pkt;
- char *s;
-+ /* variables ver,tc,fl set but not used
- int ver;
- int tc;
- int fl;
-+ */
-
- if (o_pkt == NULL)
- {
-@@ -305,10 +307,11 @@
- pkt = (struct ip6_hdr *) emalloc (size);
- bcopy (o_pkt, pkt, size);
-
-+ /* variables ver,tc,fl set but not used
- ver = get_int_local_var_by_name (lexic, "ip6_v", (pkt->ip6_flow & 0x3ffff));
-- tc =
-- get_int_local_var_by_name (lexic, "ip6_tc", (pkt->ip6_flow >> 20) & 0xff);
-+ tc = get_int_local_var_by_name (lexic, "ip6_tc", (pkt->ip6_flow >> 20) & 0xff);
- fl = get_int_local_var_by_name (lexic, "ip6_fl", pkt->ip6_flow >> 28);
-+ */
-
- pkt->ip6_plen = get_int_local_var_by_name (lexic, "ip6_plen", pkt->ip6_plen);
- pkt->ip6_nxt = get_int_local_var_by_name (lexic, "ip6_nxt", pkt->ip6_nxt);
-@@ -476,7 +479,9 @@
- tree_cell *retc;
- char *data;
- int len;
-+ /* variable pkt set but not used
- u_char *pkt;
-+ */
- struct ip6_hdr *ip6, *tcp_packet;
- struct tcphdr *tcp;
- int ipsz;
-@@ -502,7 +507,9 @@
- retc->type = CONST_DATA;
- tcp_packet = (struct ip6_hdr *) emalloc (ipsz + sizeof (struct tcphdr) + len);
- retc->x.str_val = (char *) tcp_packet;
-+ /* variable pkt set but not used
- pkt = (u_char *) tcp_packet;
-+ */
-
- bcopy (ip6, tcp_packet, ipsz);
- /* Adjust length in ipv6 header */
-@@ -949,7 +956,9 @@
- tree_cell *retc;
- char *udp;
- char *element;
-+ /* variable ip6 set but not used
- struct ip6_hdr *ip6;
-+ */
- int ipsz;
- struct udphdr *udphdr;
- int ret;
-@@ -964,7 +973,9 @@
- printf ("element = get_udp_v6_element(udp:<udp>,element:<element>\n");
- return NULL;
- }
-+ /* variable ip6 set but not used
- ip6 = (struct ip6_hdr *) udp;
-+ */
-
- if (40 + sizeof (struct udphdr) > ipsz)
- return NULL;
-diff -ru openvas-libraries-4.0.3.old/nasl/nasl_var.c openvas-libraries-4.0.3.new/nasl/nasl_var.c
---- openvas-libraries-4.0.3.old/nasl/nasl_var.c 2011-03-03 09:44:22.000000000 +0100
-+++ openvas-libraries-4.0.3.new/nasl/nasl_var.c 2011-03-23 01:49:31.000000000 +0100
+diff -ru openvas-libraries-4.0.6/nasl/nasl_var.c openvas-libraries-4.0.6.new/nasl/nasl_var.c
+--- openvas-libraries-4.0.6/nasl/nasl_var.c 2011-11-03 09:30:08.000000000 +0100
++++ openvas-libraries-4.0.6.new/nasl/nasl_var.c 2011-11-04 23:33:50.783589374 +0100
@@ -130,6 +130,9 @@
int h = hash_str (name);
lex_ctxt *c;
@@ -269,9 +33,9 @@ diff -ru openvas-libraries-4.0.3.old/nasl/nasl_var.c openvas-libraries-4.0.3.new
if (climb != 0)
{
for (c = ctxt; c != NULL; c = c->up_ctxt)
-diff -ru openvas-libraries-4.0.3.old/nasl/regex.c openvas-libraries-4.0.3.new/nasl/regex.c
---- openvas-libraries-4.0.3.old/nasl/regex.c 2011-03-03 09:44:22.000000000 +0100
-+++ openvas-libraries-4.0.3.new/nasl/regex.c 2011-03-23 01:52:50.000000000 +0100
+diff -ru openvas-libraries-4.0.6/nasl/regex.c openvas-libraries-4.0.6.new/nasl/regex.c
+--- openvas-libraries-4.0.6/nasl/regex.c 2011-11-03 09:30:08.000000000 +0100
++++ openvas-libraries-4.0.6.new/nasl/regex.c 2011-11-04 23:33:50.786589314 +0100
@@ -4058,6 +4058,10 @@
unsigned char *pdummy;
const char *sdummy;
@@ -283,24 +47,3 @@ diff -ru openvas-libraries-4.0.3.old/nasl/regex.c openvas-libraries-4.0.3.new/na
DEBUG_PRINT1 ("EXECUTING pop_failure_jump.\n");
POP_FAILURE_POINT (sdummy, pdummy,
dummy_low_reg, dummy_high_reg,
-diff -ru openvas-libraries-4.0.3.old/nasl/smb_crypt.c openvas-libraries-4.0.3.new/nasl/smb_crypt.c
---- openvas-libraries-4.0.3.old/nasl/smb_crypt.c 2011-03-03 09:44:22.000000000 +0100
-+++ openvas-libraries-4.0.3.new/nasl/smb_crypt.c 2011-03-23 01:55:32.000000000 +0100
-@@ -455,10 +455,17 @@
-
- void SMBencrypt_ntlmssp(const char *passwd, const uchar *c8, uchar p24[24])
- {
-+ /* variable ret set but not used
- bool ret;
-+ */
-+
- uchar lm_hash[16];
-
-+ /* variable ret set but not used
- ret = E_deshash_ntlmssp(passwd, lm_hash);
-+ */
-+
-+ E_deshash_ntlmssp(passwd, lm_hash);
- SMBencrypt_hash_ntlmssp(lm_hash, c8, p24);
- }
-
diff --git a/openvas-libraries-nowerror.patch b/openvas-libraries-nowerror.patch
index dde58af..ff78294 100644
--- a/openvas-libraries-nowerror.patch
+++ b/openvas-libraries-nowerror.patch
@@ -1,3 +1,7 @@
+Disable compile Werror flag to avoid stopping the compilation on warning about deprecated
+gnutls functions for setting priorities - I use this mainly because of the current issues.
+with SIGSEG in gnutls. Once resolved the gnutls and lowat patch should be used instead.
+Author: Michal Ambroz
diff -ru openvas-libraries-4.0.5/CMakeLists.txt openvas-libraries-4.0.5.new/CMakeLists.txt
--- openvas-libraries-4.0.5/CMakeLists.txt 2011-06-01 15:38:38.000000000 +0200
+++ openvas-libraries-4.0.5.new/CMakeLists.txt 2011-10-12 21:45:20.439909307 +0200
diff --git a/openvas-libraries.spec b/openvas-libraries.spec
index 2353cd5..16339ec 100644
--- a/openvas-libraries.spec
+++ b/openvas-libraries.spec
@@ -3,9 +3,9 @@ Summary: Support libraries for Open Vulnerability Assessment (OpenVAS) Scanner
URL: http://www.openvas.org
License: LGPLv2
Group: System Environment/Libraries
-Version: 4.0.5
-Release: 5%{?dist}
-Source0: http://wald.intevation.org/frs/download.php/872/%{name}-%{version}.tar.gz
+Version: 4.0.6
+Release: 1%{?dist}
+Source0: http://wald.intevation.org/frs/download.php/979/%{name}-%{version}.tar.gz
#Reported as bug 1942 Fix compile time errors - variable 'xxx' set but not used
#http://wald.intevation.org/tracker/index.php?func=detail&aid=1942&group_id=29&atid=220
@@ -17,7 +17,8 @@ Patch1: openvas-libraries-gnutls.patch
Patch2: openvas-libraries-lowat.patch
#Disable compile Werror flag to avoid stopping the compilation on warning about deprecated
-#gnutls functions for setting priorities
+#gnutls functions for setting priorities - I use this mainly because of the current issues
+#with SIGSEG in gnutls. Once resolved the gnutls and lowat patch should be used instead.
Patch3: openvas-libraries-nowerror.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
@@ -49,10 +50,26 @@ Development libraries and headers for use with openvas-libraries.
%prep
%setup -q
%patch0 -p 1 -b .notused.patch
+#Patch for gnutls > 2.12.0
#%patch1 -p 1 -b .gnutls.patch
#%patch2 -p 1 -b .lowat.patch
+
+#Used mainly to troubleshoot SIGSEG in gnutls. Once solved patch1/2 shuold be used instead
%patch3 -p 1 -b .nowerror.patch
+#Fix FSF address in source files
+OLDADDR="675 Mass Ave, Cambridge, MA 02139, USA"
+NEWADDR="51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA"
+LIST=`grep -lre "$OLDADDR" *| grep -E '.c$|.h$'`
+echo "$LIST" | xargs sed -i -e "s/$OLDADDR/$NEWADDR/"
+
+OLDADDR="59 Temple Place - Suite 330, Boston, MA 02111-1307, USA"
+sed -i -e "s/$OLDADDR/$NEWADDR/" nasl/smb_crypt.c nasl/smb_crypt.h
+
+#Fix codepage of the Changelog
+iconv -f LATIN1 -t UTF8 < ChangeLog > ChangeLog1
+mv ChangeLog1 ChangeLog
+
%build
#export CFLAGS=-Werror=unused-but-set-variable
@@ -102,6 +119,9 @@ rm -rf %{buildroot}
%{_libdir}/pkgconfig/libopenvas.pc
%changelog
+* Fri Nov 04 2011 Michal Ambroz <rebus at, seznam.cz> - 4.0.6-1
+- bump to version 4.0.6
+
* Thu Oct 18 2011 Michal Ambroz <rebus at, seznam.cz> - 4.0.5-5
- revert back to code withou gnutls modifications to confirm gnutls
issues are not caused by it
diff --git a/sources b/sources
index 56b684c..f4de4c5 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-88152081a0a0d2e8dfd63538999f56ef openvas-libraries-4.0.5.tar.gz
+dca19bec84c33fcdae03586cde60774f openvas-libraries-4.0.6.tar.gz
More information about the scm-commits
mailing list