[Openvas-commits] r6048 - in trunk/gsa: . src

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Thu Dec 3 01:27:56 CET 2009


Author: jan
Date: 2009-12-03 01:27:53 +0100 (Thu, 03 Dec 2009)
New Revision: 6048

Modified:
   trunk/gsa/ChangeLog
   trunk/gsa/src/gsad.c
Log:
* src/gsad.c (REALM, POST_BUFFER_SIZE, FILE_NOT_FOUND,
ERROR_PAGE, SERVER_ERROR, content_type, content_disposition,
response_size, log_config, verbose): New.



Modified: trunk/gsa/ChangeLog
===================================================================
--- trunk/gsa/ChangeLog	2009-12-02 22:43:43 UTC (rev 6047)
+++ trunk/gsa/ChangeLog	2009-12-03 00:27:53 UTC (rev 6048)
@@ -1,3 +1,9 @@
+2009-12-03  Jan-Oliver Wagner <jan-oliver.wagner at greenbone.net>
+
+	* src/gsad.c (REALM, POST_BUFFER_SIZE, FILE_NOT_FOUND,
+	ERROR_PAGE, SERVER_ERROR, content_type, content_disposition,
+	response_size, log_config, verbose): New.
+
 2009-12-02  Jan-Oliver Wagner <jan-oliver.wagner at greenbone.net>
 
 	* src/gsad.c (exec_omp_post, exec_omp_get): New.

Modified: trunk/gsa/src/gsad.c
===================================================================
--- trunk/gsa/src/gsad.c	2009-12-02 22:43:43 UTC (rev 6047)
+++ trunk/gsa/src/gsad.c	2009-12-03 00:27:53 UTC (rev 6048)
@@ -80,16 +80,71 @@
 #define DEFAULT_OPENVAS_MANAGER_PORT 9390
 
 /**
+ * @brief HTTP basic authentication realm.
+ */
+#define REALM "\"Greenbone Security Assistant\""
+
+/**
+ * @brief Buffer size for POST processor.
+ */
+#define POST_BUFFER_SIZE 500000
+
+/**
  * @brief Libgcrypt thread callback definition.
  */
 GCRY_THREAD_OPTION_PTHREAD_IMPL;
 
 /**
+ * @brief Last resort HTML on failure to open "default_file".
+ */
+const char *FILE_NOT_FOUND =
+  "<html><head><title>File not found</title></head><body>File not found</body></html>";
+
+/**
+ * @brief Error page HTML.
+ */
+const char *ERROR_PAGE = "<html><body>HTTP Method not supported</body></html>";
+
+/**
+ * @brief Server error HTML.
+ */
+char *SERVER_ERROR =
+  "<html><body>An internal server error has occured.</body></html>";
+
+/**
  * @brief The handle on the embedded HTTP daemon.
  */
 struct MHD_Daemon *gsad_daemon;
 
+/** @todo Ensure the accesses to these are thread safe. */
+
 /**
+ * @brief Content-Type passed between callbacks when sending files.
+ */
+char *content_type = NULL;
+
+/**
+ * @brief Content-Disposition passed between callbacks when sending files.
+ */
+char *content_disposition = NULL;
+
+/**
+ * @brief Response size passed between callbacks when sending files.
+ */
+unsigned int response_size = 0;
+
+/**
+ * @brief Logging parameters, as passed to setup_log_handlers.
+ */
+GSList *log_config = NULL;
+
+// @todo This is the definition for the entire program.
+/**
+ * @brief Verbose output flag.
+ */
+int verbose = 0;
+
+/**
  * @brief Parameter validator.
  */
 validator_t validator;



More information about the Openvas-commits mailing list