[prev in list] [next in list] [prev in thread] [next in thread]
List: openvas-cvs
Subject: [Openvas-commits] r18845 - in trunk/gsa: . src
From: scm-commit () wald ! intevation ! org
Date: 2014-02-27 21:03:26
Message-ID: 20140227210327.007929A2341B () wald ! intevation ! org
[Download RAW message or body]
Author: mattm
Date: 2014-02-27 22:03:26 +0100 (Thu, 27 Feb 2014)
New Revision: 18845
Modified:
trunk/gsa/ChangeLog
trunk/gsa/src/gsad_omp.c
Log:
* src/gsad_omp.c (get_system_reports_omp): Add command check for
GET_SLAVES.
Modified: trunk/gsa/ChangeLog
===================================================================
--- trunk/gsa/ChangeLog 2014-02-27 21:02:27 UTC (rev 18844)
+++ trunk/gsa/ChangeLog 2014-02-27 21:03:26 UTC (rev 18845)
@@ -1,5 +1,10 @@
2014-02-27 Matthew Mundell <matthew.mundell@greenbone.net>
+ * src/gsad_omp.c (get_system_reports_omp): Add command check for
+ GET_SLAVES.
+
+2014-02-27 Matthew Mundell <matthew.mundell@greenbone.net>
+
* src/html/classic/omp.xsl (get_system_reports_response): Make "Reports
for slave" control depend on GET_SLAVES access.
Modified: trunk/gsa/src/gsad_omp.c
===================================================================
--- trunk/gsa/src/gsad_omp.c 2014-02-27 21:02:27 UTC (rev 18844)
+++ trunk/gsa/src/gsad_omp.c 2014-02-27 21:03:26 UTC (rev 18845)
@@ -13207,34 +13207,37 @@
"/omp?cmd=get_tasks");
}
- /* Get the slaves. */
-
- if (openvas_server_sendf (&session,
- "<get_slaves"
- " sort_field=\"name\""
- " sort_order=\"ascending\"/>")
- == -1)
+ if (command_enabled (credentials, "GET_SLAVES"))
{
- g_string_free (xml, TRUE);
- openvas_server_close (socket, session);
- return gsad_message (credentials,
- "Internal error", __FUNCTION__, __LINE__,
- "An internal error occurred while getting the system reports. "
- "The current list of system reports is not available. "
- "Diagnostics: Failure to send command to manager daemon.",
- "/omp?cmd=get_tasks");
- }
+ /* Get the slaves. */
- if (read_string (&session, &xml))
- {
- g_string_free (xml, TRUE);
- openvas_server_close (socket, session);
- return gsad_message (credentials,
- "Internal error", __FUNCTION__, __LINE__,
- "An internal error occurred while getting the system reports. "
- "The current list of system reports is not available. "
- "Diagnostics: Failure to receive response from manager daemon.",
- "/omp?cmd=get_tasks");
+ if (openvas_server_sendf (&session,
+ "<get_slaves"
+ " sort_field=\"name\""
+ " sort_order=\"ascending\"/>")
+ == -1)
+ {
+ g_string_free (xml, TRUE);
+ openvas_server_close (socket, session);
+ return gsad_message (credentials,
+ "Internal error", __FUNCTION__, __LINE__,
+ "An internal error occurred while getting the system reports. "
+ "The current list of system reports is not available. "
+ "Diagnostics: Failure to send command to manager daemon.",
+ "/omp?cmd=get_tasks");
+ }
+
+ if (read_string (&session, &xml))
+ {
+ g_string_free (xml, TRUE);
+ openvas_server_close (socket, session);
+ return gsad_message (credentials,
+ "Internal error", __FUNCTION__, __LINE__,
+ "An internal error occurred while getting the system reports. "
+ "The current list of system reports is not available. "
+ "Diagnostics: Failure to receive response from manager daemon.",
+ "/omp?cmd=get_tasks");
+ }
}
/* Cleanup, and return transformed XML. */
_______________________________________________
Openvas-commits mailing list
Openvas-commits@wald.intevation.org
https://lists.wald.intevation.org/cgi-bin/mailman/listinfo/openvas-commits
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic