[Openvas-commits] r6720 - in trunk/openvas-manager: . src

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Thu Feb 11 19:14:45 CET 2010


Author: mattm
Date: 2010-02-11 19:14:40 +0100 (Thu, 11 Feb 2010)
New Revision: 6720

Modified:
   trunk/openvas-manager/ChangeLog
   trunk/openvas-manager/src/tasks_sql.h
Log:
	* src/tasks_sql.h (find_note): Remove redundant owner constraint.

Modified: trunk/openvas-manager/ChangeLog
===================================================================
--- trunk/openvas-manager/ChangeLog	2010-02-11 18:02:38 UTC (rev 6719)
+++ trunk/openvas-manager/ChangeLog	2010-02-11 18:14:40 UTC (rev 6720)
@@ -1,5 +1,9 @@
 2010-02-11  Matthew Mundell <matthew.mundell at intevation.de>
 
+	* src/tasks_sql.h (find_note): Remove redundant owner constraint.
+
+2010-02-11  Matthew Mundell <matthew.mundell at intevation.de>
+
 	Add OMP GET_NOTES.
 
 	* src/tasks_sql.h (init_note_iterator, note_iterator_uuid)

Modified: trunk/openvas-manager/src/tasks_sql.h
===================================================================
--- trunk/openvas-manager/src/tasks_sql.h	2010-02-11 18:02:38 UTC (rev 6719)
+++ trunk/openvas-manager/src/tasks_sql.h	2010-02-11 18:14:40 UTC (rev 6720)
@@ -11360,9 +11360,7 @@
 gboolean
 find_note (const char* uuid, note_t* note)
 {
-  gchar *quoted_uuid;
-  assert (current_credentials.uuid);
-  quoted_uuid = sql_quote (uuid);
+  gchar *quoted_uuid = sql_quote (uuid);
   if (user_owns_uuid ("note", quoted_uuid) == 0)
     {
       g_free (quoted_uuid);
@@ -11370,12 +11368,8 @@
       return FALSE;
     }
   switch (sql_int64 (note, 0, 0,
-                     "SELECT ROWID FROM notes"
-                     " WHERE uuid = '%s'"
-                     " AND ((owner IS NULL) OR (owner ="
-                     " (SELECT users.ROWID FROM users WHERE users.uuid = '%s')));",
-                     quoted_uuid,
-                     current_credentials.uuid))
+                     "SELECT ROWID FROM notes WHERE uuid = '%s';",
+                     quoted_uuid))
     {
       case 0:
         break;



More information about the Openvas-commits mailing list