Author: reinke
Date: 2008-10-14 22:21:32 +0200 (Tue, 14 Oct 2008)
New Revision: 1544
Modified:
trunk/openvas-plugins/scripts/pkg-lib-rpm.inc
Log:
Bugfix, reverting previous change in pkg-lib-rpm.inc
Modified: trunk/openvas-plugins/scripts/pkg-lib-rpm.inc
===================================================================
--- trunk/openvas-plugins/scripts/pkg-lib-rpm.inc 2008-10-14 14:57:31 UTC
(rev 1543)
+++ trunk/openvas-plugins/scripts/pkg-lib-rpm.inc 2008-10-14 20:21:32 UTC
(rev 1544)
@@ -20,7 +20,7 @@
# but up to date, and returns 1 if it is installed and vulnerable
-# Example call: isrpmvuln(pkg:"gnutls-utils", rpm:"1.4.1~3", rls:"FC6")
+# Example call: isrpmvuln(pkg:"gnutls-utils", rpm:"gnutls-utils~1.4.1~3",
rls:"FC6")
function isrpmvuln(pkg, rpm, rls) {
# Check that we have the data for this release.
@@ -30,8 +30,12 @@
}
rpms = get_kb_item("ssh/login/rpms");
if(!rpms) return(0);
-# pat = string(";(", pkg, "~[^;]+);");
- pat = string(pkg, "~([^;]+);");
+
+ # Must include in the package search leading \n or ; to prevent
+ # overly permissive search (e.g. search for 'ash' must not match 'bash')
+
+ pat = string("[\n;](", pkg, "~[^;]+);");
+# pat = string(pkg, "~([^;]+);");
matches = eregmatch(pattern:pat, string:rpms);
if(isnull(matches)) {
return(0);
_______________________________________________
Openvas-commits mailing list
[email protected]
http://lists.wald.intevation.org/mailman/listinfo/openvas-commits