[Openvas-commits] r10632 - in trunk/openvas-manager: . src
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Fri Mar 25 13:27:43 CET 2011
Author: mattm
Date: 2011-03-25 13:27:39 +0100 (Fri, 25 Mar 2011)
New Revision: 10632
Modified:
trunk/openvas-manager/ChangeLog
trunk/openvas-manager/src/manage_sql.c
Log:
* src/manage_sql.c (find_report_format): Add a user check to the
constraint XML because multiple users can import the same report format.
Modified: trunk/openvas-manager/ChangeLog
===================================================================
--- trunk/openvas-manager/ChangeLog 2011-03-25 12:20:06 UTC (rev 10631)
+++ trunk/openvas-manager/ChangeLog 2011-03-25 12:27:39 UTC (rev 10632)
@@ -1,3 +1,8 @@
+2011-03-25 Matthew Mundell <matthew.mundell at greenbone.net>
+
+ * src/manage_sql.c (find_report_format): Add a user check to the
+ constraint XML because multiple users can import the same report format.
+
2011-03-18 Matthew Mundell <matthew.mundell at greenbone.net>
Add support for Scanner generated report host details.
Modified: trunk/openvas-manager/src/manage_sql.c
===================================================================
--- trunk/openvas-manager/src/manage_sql.c 2011-03-25 12:20:06 UTC (rev 10631)
+++ trunk/openvas-manager/src/manage_sql.c 2011-03-25 12:27:39 UTC (rev 10632)
@@ -22926,9 +22926,14 @@
*report_format = 0;
return FALSE;
}
+ assert (current_credentials.uuid);
switch (sql_int64 (report_format, 0, 0,
- "SELECT ROWID FROM report_formats WHERE uuid = '%s';",
- quoted_uuid))
+ "SELECT ROWID FROM report_formats WHERE uuid = '%s'"
+ " AND ((owner IS NULL) OR (owner ="
+ " (SELECT users.ROWID FROM users"
+ " WHERE users.uuid = '%s')));",
+ quoted_uuid,
+ current_credentials.uuid))
{
case 0:
break;
More information about the Openvas-commits
mailing list