[Openvas-commits] r427 - in trunk/openvas-libnasl: . nasl

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Tue Oct 9 17:59:50 CEST 2007


Author: bh
Date: 2007-10-09 17:59:49 +0200 (Tue, 09 Oct 2007)
New Revision: 427

Modified:
   trunk/openvas-libnasl/ChangeLog
   trunk/openvas-libnasl/nasl/nasl_grammar.y
Log:
* nasl/nasl_grammar.y (init_nasl_ctx): Treat a missing signature
like a bad signature so that only nasl files with good signatures
are executed if signature checks are not disabled.


Modified: trunk/openvas-libnasl/ChangeLog
===================================================================
--- trunk/openvas-libnasl/ChangeLog	2007-10-08 22:59:46 UTC (rev 426)
+++ trunk/openvas-libnasl/ChangeLog	2007-10-09 15:59:49 UTC (rev 427)
@@ -1,3 +1,9 @@
+2007-10-09  Bernhard Herzog  <bh at intevation.de>
+
+	* nasl/nasl_grammar.y (init_nasl_ctx): Treat a missing signature
+	like a bad signature so that only nasl files with good signatures
+	are executed if signature checks are not disabled.
+
 2007-10-09  Jan-Oliver Wagner <jan-oliver.wagner at intevation.de>
 
 	* VERSION: updated to 0.9.0.SVN.

Modified: trunk/openvas-libnasl/nasl/nasl_grammar.y
===================================================================
--- trunk/openvas-libnasl/nasl/nasl_grammar.y	2007-10-08 22:59:46 UTC (rev 426)
+++ trunk/openvas-libnasl/nasl/nasl_grammar.y	2007-10-09 15:59:49 UTC (rev 427)
@@ -531,18 +531,14 @@
       else
 	pc->authenticated = 0;
 
-      if (sig > 0)
+      if (sig != 0)
 	{
-	  fprintf(stderr, "%s: bad signature."
+	  fprintf(stderr, "%s: bad or missing signature."
 		  " Will not execute this script\n", full_name);
 	  fclose(pc->fp);
 	  pc->fp = NULL;
 	  return -1;
 	}
-      else if (sig < 0)
-	fprintf(stderr, "%s: Could not verify the signature -"
-		" this script will be run in non-authenticated mode\n",
-		full_name);
     }
   return 0;
 }



More information about the Openvas-commits mailing list